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.
Hi,
You can use Expression instead of Statistics, and use "0" for the expression title.
Shengdi
I am including a couple of my colleagues below that could better assist you as I am no longer working on ExB these days. @DanJiang @Wei_Ying .
Cheers,
David
Hi David,
Could you elaborate on how you are doing this?
I have a text widget using dynamic text on selected features. I have tried both Statistics and Expression to get the count of selected features. Seems to be working fine until the Count result = 0, then it just shows the Expression used.
If I have 2 features selected, the text widget displays:
"Selected Features: 2"
However, if there is no selection (I.e., selected feature count = 0), it displays:
"Selected Features: COUNT({OBJECTID}) "
How do I make this show the "actual" count of selected features?
It should report:
"Selected Features: 0"
Thanks,
R_
I miss read the workaround, my scenario is akin to an asset viewer, so to select the first in a default view as a default value would end up misrepresenting what is on the map/expbuilder app and cause confusion to the user, UX would essentially be poor. is there a way to just show a default text of ""/nothing until clicked or when nothing is selection rather than the curly bracket {fieldname} as described above? Thanks for your time,
Cheers
Melissa
(New Plymouth District Council, NZ)
Hi David, when is the next release planned?
In our next release, you will be able to use Feature info with selected features. For example, it will only show when you select an item on the map. When no item is selected on the map it will have the no data message. In this scenario, there are no feature counts or arrows.
I agree. I'm attempting to implement @DavidMartinez 's workaround solution but would like to see a setting that could be enabled with a configurable "no data message" similar to the Feature Info configuration. Another potential solution would be for the Feature Info Widget to have more configurations that allow field visibility, alias, arrangement, and disabling functions such as the next arrows and feature counts.
Great work around @DavidMartinez - I honestly had never seen those settings in the feature layer configuration for ExB.
Until we support more expressions to manage what is shown in the text widget here is a workaround:
Use a default in the text box and use view for empty selection in the feature layer under the data panels so it uses default values if nothing is selected. By design, it will pull in the first record from the feature layer. You could have that record blank if nothing is selected. For example, the animated gif below has a default value for Washington D.C. if nothing is selected.
Just providing a 'bump' on the ability to hide the expressions when nothing is selected, or meets the criteria:
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.
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.
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.
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?
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.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.