Select to view content in your preferred language

Dynamic Content Expression Not Working

1552
6
06-30-2023 02:48 PM
Labels (1)
ZachStern
Emerging Contributor

Hi folks, I am trying to insert some Dynamic Content into a Text box. The Dynamic Content should sum the values of one field and divide by the sum of another in order to create a percentage. However, it won't calculate the value and just returns the name "LMI Percentage." I'm new to Experience Builder so sorry if this is an easy answer. When I used the Statistics option and just insert SUM({LMI_UNIT}) that works but the Expression is giving me a headache. Thanks

 

ZachStern_0-1688161604526.png

 

0 Kudos
6 Replies
DanJiang
Esri Contributor

Hi @ZachStern , 

Based on the screenshot, it seems you use the "Selected features" view in your expression. That means only when there are selections the expression will be calculated, otherwise it will display the expression label. 

To solve your issue, simply change the view (click to see the dropdown) to default view. 

DanJiang_0-1689755859650.png

 

0 Kudos
JustinH
Frequent Contributor

Hello- 


I am currently having issues with Expressions as well. I am changing to Default View but the Expression name still appears in the box rather than the calculated expression. Any advise will be helpful! 

 

JustinH_0-1728424117282.png

 

0 Kudos
DanJiang
Esri Contributor

This could be the same reason. The preset view for attributes in the Expression is "Selected features", so please make sure the view is correct very time you insert an attribute. 

DanJiang_0-1728438158623.png

 

0 Kudos
JustinH
Frequent Contributor

Hmm... It seems that I have set each feature upon adding it to the default view and still have the same issue. Is there a limit to the expression? I am trying to add the sum of 7 fields like my screenshot above... 

0 Kudos
JustinH
Frequent Contributor

Thanks for your help- I did find the issue. One of the fields is not calculating correctly even though it has an integer field type. Do you happen to have any guidance for this? Not sure what I can do to fix this 

0 Kudos
DanJiang
Esri Contributor

If that is the case, I am afraid we could not fix this, as the expression is the calculation result of each part and one part fails will cause the whole expression value missing. 

0 Kudos