Select to view content in your preferred language

Hide Variable/Curly Bracket Until Selected

5550
22
04-07-2020 06:20 AM
DevinLavigne
Frequent Contributor

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.

0 Kudos
22 Replies
DavidMartinez
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

0 Kudos
DevinLavigne
Frequent Contributor

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?

0 Kudos
DavidMartinez
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

0 Kudos
DevinLavigne
Frequent Contributor

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.

0 Kudos
DavidMartinez
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

DevinLavigne
Frequent Contributor

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

FranciscoRodriguez2
Occasional Contributor

Hi David,

I was looking for the same functionality and came across this post. I cant for the life of me find the ENABLE MAXIMUM ITEMS FOR 1.  On the contents panel for the list widget.  Any help would be greatly appreciated.

DATA_EXPERIENCEBUILDER.PNG

0 Kudos
DavidMartinez
Esri Regular Contributor

Hi Francisco,

I just noticed the other day that option has been removed. Can you explain your workflow to me? 

 

Thanks,


David

0 Kudos
BrianBaldwin
Esri Regular Contributor

Just providing a 'bump' on the ability to hide the expressions when nothing is selected, or meets the criteria:

BrianBaldwin_1-1617756006586.png

This presents a pretty goofy looking solution to the end user...

I could also put multiple features into the same text box... so that if only one feature is selected, then those details populate in the text box.

-----------------------------------

Brian Baldwin, Esri Inc., Lead Solution Engineer
https://www.linkedin.com/in/baldwinbrian