Hi All,
I am using the embed widget in Experience Builder to embed surveys so that I can click on a map feature and open a survey built on the service (in edit mode). Basically, I adapted this example of a QA/QC workflow using a Dashboard to Experience Builder (https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-embedding-a-survey...). This just uses the URL parameters and the Global ID to open the survey for editing. The app and survey looks great and I am able to submit data BUT the calculations are not working in the embedded survey!
After some investigation, I have figured out that the issue seems to be with calculations in edit mode. The calculations work for new records; however, when I open an existing record to update it (in edit mode), I see the 'Recalculate' button; however it does not work!
Admittedly, the calculation is a bit complicated and awkward as I'm trying to calculate Risk from a risk matrix (see screenshot). Here is the calculation:
if(((selected(${DamageOrLossProbability},'VeryLikely') and selected(${ConsequenceMagnitude},'Major')) or
(selected(${DamageOrLossProbability},'VeryLikely') and selected(${ConsequenceMagnitude},'Moderate'))
or (selected(${DamageOrLossProbability},'Likely') and selected(${ConsequenceMagnitude},'Major'))),
'VeryHigh', if(((selected(${DamageOrLossProbability},'Likely') and selected(${ConsequenceMagnitude},'Moderate')) or
((selected(${DamageOrLossProbability},'Possible')) and selected(${ConsequenceMagnitude},'Major'))),
'High', if(((selected(${DamageOrLossProbability},'Unlikely') and selected(${ConsequenceMagnitude},'Major')) or
(selected(${DamageOrLossProbability},'Possible') and selected(${ConsequenceMagnitude},'Moderate'))), 'Intermediate',
if(((selected(${DamageOrLossProbability},'VeryLikely') and selected(${ConsequenceMagnitude},'Minor')) or
(selected(${DamageOrLossProbability},'Likely') and selected(${ConsequenceMagnitude},'Minor')) or
(selected(${DamageOrLossProbability},'Possible') and selected(${ConsequenceMagnitude},'Minor'))) or
(selected(${DamageOrLossProbability},'Unlikely') and selected(${ConsequenceMagnitude},'Moderate')), 'Low', 'VeryLow'))))
Thanks in advance,
Kim