How to Filter Data in Expression using Text Widget

2421
4
04-01-2020 05:18 PM
EijiMatsuzaki
New Contributor

Hello,

What I want to do:

I simply want to add an expression in Dynamic content of Text widget so that I can calculate proportion (see Figure below). However, it fails whenever I add using conditional sentences (==). I tried lots but nothing works. 

Dynamic Text screenshot

Question:

  1. Could someone kindly teach me how to filter data using Expression? Is it even possible to add conditional sentences?
  2. Are there any instruction documents for how to use Expression of Dynamic Text widget. I have not seen anything in the homepage. Does it use SQL or Arcade expression?

I really appreciate your assistance.

Tags (2)
4 Replies
KevinMayall
Occasional Contributor III

Similarly, I created an expression to calculate population per square mile, and I want to use the ROUND function on the result.  I think this would be an Arcade function but maybe Arcade is not available in Experience Builder?

Kevin
0 Kudos
DanJiang
Esri Contributor

Hi Eiji and Kevin, 

Thanks for the question. The dynamic content does not support SQL conditions or Arcade functions for now. The expression only supports string binding and simple calculations currently (see dynamic content help) and other functions will be added gradually in further releases. 

To display filtered results in Text, maybe you can apply filters to the data source used in the Text widget in two access:

  • set filters in the map viewer
  • use the Filter widget in EXB

Be aware that both filters are global and will affect every widget that consumes the same data source. 

We are planning to support set filters within Text in the next release and you will be able to display info under certain conditions. 

I_AM_ERROR
Occasional Contributor

Is there any update on when Arcade expressions or a ROUND function would be available?

CherieBryant
New Contributor III

Any updates on this? If Arcade functionality is not going to be available soon, adding the MEDIAN function as an option would also be very helpful.

0 Kudos