I have a bit of a challenge using a multiple choice field in typeform and passing the values to Salesforce via Zapier.
I have choices
Car - Home - Boat - Bicycle
which in Salesforce will be put into a textfield. Zapier will take those selections and send them to Salesforce where it will look like
CarHomeBoatBicycle
which is not that readable.
In Zapier I am trying to comma separate the values in the template, where I add , in the field under templates. But that will look weird when only some choices are selected. It could like
Car,,,Bicycle
I want it to look like
Car, Bicycle
I have tried to use the formatter action in Zapier, but that didn't help me towards a solution.
David here, from the Zapier Platform team. Great question!
The bad news is there's no good out-of-the-box way to do this. We've got an open feature request with the typeform team to make this process easier, but there's been no motion so far.
The good news, it's a pretty straightforward code step.
You'll want to set up a Javascript Code step that maps in each value from typeform. These are stored in the inputData
variable.
Then, you can paste the following:
return {formatted: Object.values(inputData).join(', ')}
This takes all the int put values (some combination of transportation methods) and joins them separated by ", "
. You'll need to update the input to the zap whenever your typeform options change, but otherwise this should work as expected.
Let me know if you've got any other questions!