I set up a custom Enterprise 11.3 connector to use Survey123 triggers in Power Automate. I'm running into what seems to be a perennial issue: coded domain values. I'm writing new S123 submissions to Google Sheets, and the domain codes are transferring over, not the values. For instance the Site ID instead of the Site Name. I know there's a get coded domain values connector for Enterprise, but there isn't one for S123. Is there a calculation I can do on the field to get the domain value?
Solved! Go to Solution.
jr:choice-name()
Used for select_one questions. It returns the label associated with the name of the choice in the given question. Be aware that the question must be defined inside quotes.
Example:
jr:choice-name(${select_one}, '${select_one}')
Used for select_multiple questions. It returns the label associated with the name of the choice in the given question. The selected-at() function must be used to extract the label for individual answers. Be aware that the question must be defined inside quotes.
Example:
jr:choice-name(selected-at(${select_multiple}, 3), '${select_multiple}')
jr:choice-name()
Used for select_one questions. It returns the label associated with the name of the choice in the given question. Be aware that the question must be defined inside quotes.
Example:
jr:choice-name(${select_one}, '${select_one}')
Used for select_multiple questions. It returns the label associated with the name of the choice in the given question. The selected-at() function must be used to extract the label for individual answers. Be aware that the question must be defined inside quotes.
Example:
jr:choice-name(selected-at(${select_multiple}, 3), '${select_multiple}')
OK, thanks. I added a calculate field called "Dayname." Now I need to figure out how to bring in this field to the Power Automate flow. It's not listed in the dynamic variables.
You are using a calculate question type without a label value, so that value is not being retained or stored in your data. I would make it a text field with a hidden appearance.
OK. I set the field type to text, hidden with a label "Day Name". The bind::esri:field type is set to null. I'm able to successfully republish but it's still not showing up as a dynamic variable in Power Automate
Setting the field type to null is just the same problem. You are not storing the value anywhere, so it ONLY exists in that survey and once it is submitted that value disappears.
OK. If I set it off null, it tells me that there is no field called Day Name in the feature service and won't publish.
You are using your survey with an existing feature service, so you need to add the Dayname field to the layer first and then republish your survey.
That seems pretty redundant
I added the field dayname to the feature service and added this variable in Power automate. It's coming in blank in Google Sheets. My calculation is jr:choice-name(selected-at(${dayofweek}, 3), '${dayofweek}')
The raw outputs of the S123 connector all have the domain codes. In this case dayofweek is 3, but dayname is null