Unexpected filter interaction with a text widget

341
2
Jump to solution
01-18-2024 11:50 AM
Lance_Charnes
New Contributor

I'm learning ExB by building an EOC Situation Board for my city. (Nothing like jumping into the deep end...) The Damage Assessment board is doing something I can't figure out how to fix.

Lance_Charnes_0-1705606190011.png

The five text widgets under "Assessment Status" are each fed by a data view. The four in the row across do a count({ObjectID}) in dynamic content to get their numbers. "Total" counts from the default view of the table; the other three have their own data views. The "Latest FDA" widget uses a max({FDA_Assess_Date_Time}) in dynamic content to get the latest date/time.

"Target Type Filters" is just a normal filter widget.

When I activate one of the filters, the four text widgets with the numbers under "Assessment Status" reflect the numbers for the DA targets displayed by the filter, including zero if it's appropriate. (I didn't plan that, but it's kind of cool anyway.) However, if none of those targets has a value in {FDA_Assess_Date_Time}, then the "Latest FDA" text widget shows the ugly field code rather than zero or nothing.

I've tried having the "Latest FDA" widget pull from the default table view and from its own data view, but it keeps doing this. I have a "View for empty selection" defined (the entire data table sorted), but that doesn't seem to do it either. The filters are completely taking over the layer.

How do I fix this?

 

0 Kudos
1 Solution

Accepted Solutions
ShengdiZhang
Esri Regular Contributor

Hi @Lance_Charnes ,

Can you use an expression, instead of an attribute in the text widget?

You can customize the expression name so that it is displayed when there are no records in the data view.

ShengdiZhang_0-1705656612026.png

Regards,

Shengdi

View solution in original post

0 Kudos
2 Replies
ShengdiZhang
Esri Regular Contributor

Hi @Lance_Charnes ,

Can you use an expression, instead of an attribute in the text widget?

You can customize the expression name so that it is displayed when there are no records in the data view.

ShengdiZhang_0-1705656612026.png

Regards,

Shengdi

0 Kudos
Lance_Charnes
New Contributor

That worked. It's pretty non-obvious, though. Thanks!

0 Kudos