Text - dynamic content - Selected - How to change default?

190
3
01-19-2022 05:52 PM
elpinguino
Occasional Contributor II

Hi ExB community,

I'm working with the text widget. I've applied dynamic content to it, so when the user selects a polygon, information about that polygon appears.

I notice when a polygon isn't selected, the expression shows, which I don't really want them to see.

Is there a way to change this?

I've made a quick video explaining what I mean.

https://watch.screencastify.com/v/DrluavJm2Et7VeHcu5Jk

I've had to grey out some areas due for privacy.

3 Replies
RhettZufelt
MVP Frequent Contributor

One "workaround" is to enter the dynamic text as an expression (instead of Attribute) and give the expression a name like "No Data", or whatever you want to appear when there isn't a value.

RhettZufelt_0-1642694726803.png

Then, if there is no data in that field for the selected feature, it displays the Expression title, not the expression itself.

Didn't seem to work at first, but just re-tested and putting a space as the Expression name makes it "appear" to be empty when no data.

R_

0 Kudos
elpinguino
Occasional Contributor II

Clever. That's a good one! Would be good though if this could get looked at in the future by the developers.

rzufelt
Occasional Contributor

this workaround was suggested by one of the developers on a separate post.  So, they are aware.

 

R_