How to remove underscores from survey so they will not show in Power Automate email report?

2017
3
Jump to solution
04-27-2021 12:27 PM
MayraHernandez
New Contributor III

Hello, 

I created a survey using Survey123 Connect. The survey has several multiple choice questions. I connected the survey to Power Automate so that I receive emails every time a survey is submitted. The email includes the survey results but all the answers include an underscore. I tried to remove the underscores from the xls form but the choice names with spaces cannot be added to multiple choice selects.   

Can someone please show me how to remove the underscores?

0 Kudos
1 Solution

Accepted Solutions
ZacharySutherby
Esri Regular Contributor

Hello @MayraHernandez

Ismael has a really good Esri Community blog on using Survey123 with Power Automate, please check out the blog for some good tips and notes on using Power Automate. 

In the blog he says the output of a select_one question in Microsoft Flow will not be the label of your choice, but its name.  If you want to include the labels of your selected choices in the payload of the webhook, so you can use them through the Dynamic Content in Flow, then use the jr:choice-name() function to extract the label in a calculate or hidden question.

For example: jr:choice-name(${activity},'${activity}')

Thank you, 

Zach

Thank you,
Zach

View solution in original post

3 Replies
ZacharySutherby
Esri Regular Contributor

Hello @MayraHernandez

Ismael has a really good Esri Community blog on using Survey123 with Power Automate, please check out the blog for some good tips and notes on using Power Automate. 

In the blog he says the output of a select_one question in Microsoft Flow will not be the label of your choice, but its name.  If you want to include the labels of your selected choices in the payload of the webhook, so you can use them through the Dynamic Content in Flow, then use the jr:choice-name() function to extract the label in a calculate or hidden question.

For example: jr:choice-name(${activity},'${activity}')

Thank you, 

Zach

Thank you,
Zach
MayraHernandez
New Contributor III

Hi @ZacharySutherby 

Thank you for your response. I followed the steps in the blog you provided and the labels no longer show the underscores. 

I did notice that when a user selects two choices in the multiple choice, the email I receive from Power Automate only shows one answer. I thought the fix was to add the same dynamic text twice but it only added the same response twice. 

Do you have any suggestions on what to do so that the multiple choice answers selected by the user appears on the email I receive?

Here is an example of the email response:

MayraHernandez_0-1620865151456.png

 

Thank you,

Mayra Hernandez 

0 Kudos
abureaux
MVP Regular Contributor

The jr:choice-name trick doesn't work with select_multiple natively. You will have to add an annoying number of calculates and IF statements to handle that within S123.

If you want to handle this in Power Automate to simple remove underscores (as you mentioned earlier), that should be pretty easy. Here is a guide that I believe will help out: https://www.alanps1.io/power-platform/flow/flow-stripping-unwanted-characters-or-special-characters-...

0 Kudos