Select to view content in your preferred language

Only show fields that are filled out in the pop up

465
1
07-06-2022 04:59 AM
JulieCulligan
Occasional Contributor

It would be nice if the pop up could follow the same structure as the survey123 desktop view.  Only when a field is filled out does it show it in the pop up.  At least have a setting where this can occur.  This idea was born from calculated fields, so that if there is nothing there the user doesn't have to scroll through a ton of empty fields, but as soon as information is populated it can be visible. 

Tags (2)
1 Comment
JustinReynolds

It would be great to have this natively supported. 

It is fairly easy (maybe a bit tedious) to accomplish with an html popup and arcade expressions.

In some cases we change the color of a field, or hide entire sections (table body) or hide individual fields.

In the case below I'm not checking if a value is empty, but rather if the gnss position source type is 'user defined'.  If so then we don't display the remaining gnss fields. 

Partial html

 

<tbody>
    <tr style='background-color: #004968;'>
      <td colspan='2' style='width: auto; text-align: center; color: #F9F4E3;'><b><u>GNSS Metadata</u></b></td>
    </tr>
    <tr style='background-color: #aaaaaa; border: 1px solid'>
      <th style='border: 1px solid; padding: 5px; text-align: right'><b>Position Source: </b></th>
      <td style='border: 1px solid; padding: 5px'>{esrignss_positionsourcetype}</td>
    </tr>
    <tr style='display:{expression/popup_vis_GNSS_user_defined}; background-color:#d0d0d0; border:1px solid'>
      <th style='border: 1px solid; padding: 5px; text-align: right'><b>Receiver Name: </b></th>
      <td style='border: 1px solid; padding: 5px'>{esrignss_receiver}</td>
    </tr>
    <tr style='display:{expression/popup_vis_GNSS_user_defined}; background-color: #aaaaaa; border: 1px solid'>
      <th style='border: 1px solid; padding: 5px; text-align: right'><b>Latitude: </b></th>
      <td style='border: 1px solid; padding: 5px'>{esrignss_latitude}</td>
    </tr>
    <tr style='display:{expression/popup_vis_GNSS_user_defined}; background-color: #d0d0d0; border: 1px solid'>
      <th style='border: 1px solid; padding: 5px; text-align: right'><b>Longitude: </b></th>
      <td style='border: 1px solid; padding: 5px'>{esrignss_longitude}</td>
    </tr>
    <tr style='display:{expression/popup_vis_GNSS_user_defined}; background-color: #aaaaaa;'>
      <th style='border: 1px solid; padding: 5px; text-align: right'><b>Ellipsoidal/MSL Height: </b></th>
      <td style='border: 1px solid; padding: 5px'>{esrignss_altitude}</td>
    </tr>
    <tr style='display:{expression/popup_vis_GNSS_user_defined};  background-color:#d0d0d0; border:1px solid'>
      <th style='border: 1px solid; padding: 5px; text-align: right'><b>Horizontal Accuracy: </b></th>
      <td style='border: 1px solid; padding: 5px'>{esrignss_h_rms}</td>
    </tr>
    <tr style='display:{expression/popup_vis_GNSS_user_defined}; background-color: #aaaaaa;'>
      <th style='border: 1px solid; padding: 5px; text-align: right'><b>Vertical Accuracy: </b></th>
      <td style='border: 1px solid; padding: 5px'>{esrignss_v_rms}</td>
    </tr>
    <tr style='display:{expression/popup_vis_GNSS_user_defined}; background-color:#d0d0d0; border:1px solid'>
      <th style='border: 1px solid; padding: 5px; text-align: right'><b>Fix Type: </b></th>
      <td style='border: 1px solid; padding: 5px'>{esrignss_fixtype}</td>
    </tr>
  </tbody>

 

The arcade expression...

 

// popup_vis_GNSS_user_defined

// Reduce the size of the GNSS Group if location is user-defined and 
// does not include GPS data

IIf($feature['ESRIGNSS_POSITIONSOURCETYPE'] == 1, 'none', 'table-row')