Hide Variable/Curly Bracket Until Selected

89
6
04-07-2020 06:20 AM
Highlighted
Occasional Contributor III

In the Text Widget/Dynamic Text is there a way to hide the variable and the curly brackets until something is selected? Or a way to write an expression - i.e. If {County} = "" Then "" Else {County}? Seems like this should be easy but I'm not seeing anything. Thanks.

Reply
0 Kudos
6 Replies
Highlighted
Esri Regular Contributor

Hi Devin,

The expression in the dynamic content only supports string binding and simple calculations (e.g., addition, subtraction). We will add other functions in future releases. 

Cheers,

David

Reply
0 Kudos
Highlighted
Occasional Contributor III

Thanks David. So nothing then in Dyanmic Text widget? I suppose another way to do this is to hide the widget with nothing selected. Is there a way to hide the widget if nothing is selected?

Reply
0 Kudos
Highlighted
Esri Regular Contributor

Hey Devin, can you describe your workflow? The only way to hide (not really hide it) the widget is by adding it to another page, where you have the user click a button for more details. Otherwise, it will display the field name until it is invoked from the map or it is pulling from the data source like the list widget.

David

Reply
0 Kudos
Highlighted
Occasional Contributor III

David - you can see what I've built here - https://arcg.is/GKn0j

The dynamic text in the top right is what I'm trying to figure out.

Reply
0 Kudos
Highlighted
Esri Regular Contributor

Hi Devin,

Thanks for bringing this to our attention. We need an option to preload the text widget just like the FeatureInfo widget in your design. Here is an alternative:

  • Add a list widget
  • Select an empty template
  • Drag a text widget to the list widget. Add your data source and pick your attributes.
  • Resize the widget as needed.
  • Select the content panel for the list widget.
    • Enable maximum items for 1.
    • Click Arrangement and change the direction to down.
    • Disable scroll bar.
    • Click States and for the background fill, change it to the color hex you have for your previous text widget.
    • Disable Selected state.
    • Click on your map widget and go to Action in the right hand panel-->Add a trigger-->Record Selection Change-->List widget-->Filter-->Select data-->Select Layer. This will filter the list widget to update each time the map is clicked.  You will need to do the same steps on the Feature Info widget for the list widget.

Let me know if this works for you. 

Cheers,

David

Highlighted
Occasional Contributor III

I had started down that road and then thought...there has to be an easier solution..heh...I'll get on it. Thanks David.

Reply
0 Kudos