Issue while adding a multiple choice response in a data table
While working on the use-case, there is an issue encountered while adding row in data table with column's data type- multiple choice. Replicated the scenario in a test workflow and issue still persists.
Test Scenario use-case:
1. Sending a web-form
2. Saving data into data-table
I've attached the image for reference.
PS- When I was working with the original use-case, then issue was multiple choice values were being saved in different columns and my understanding is- multiple choice values will be saved in single column with comma-separated.
Let me know what I'm doing wrong, or is there a bug with multiple choice options.
Answers
-
Hi @William_140055
Thanks for reaching out!
Single Choice or Multiple Choice selections are saved as an object type. For this reason, before adding to the table two things need to happen:1.Use a 'Field: Set Value of a Text Field’ action to make the multiple-choice reference a text field.
2.Use a ‘Field: Field Formulas’ action to remove the commas from the multiple-choice reference:
Use this as your formula:
x= fields[‘multiple-choice’];
x = x.replace(/,/g," ");
result = xOnce these steps are added, you can use the return field from the field formula to add your multiple choice(s) to the table column desired.
2 -
You can also add quotes around the field reference in your add to table process eg. {{lname}},{{fname}},"{{jobs}}",{{state}}
The quotes will take the comma separated values and treat them as a single string when saving into the data table. Note, as long as none of your values have quotes associated with them.1