You are viewing limited content. For full access, please sign in.

Question

Question

checkbox data to sql

asked on August 14, 2023

I have a form that triggers a workflow to save data to SQL. I am having trouble getting the checkbox data to save in a clean format. I have been able to remove the underscores, but I would like to separate each checkbox value with a coma or semi-colon. Any suggestions? 

0 0

Answer

SELECTED ANSWER
replied on August 15, 2023

The problem you're having is that the selected checkbox values are already a list, but the split function creates another list so the indexing can't really work on both lists cleanly.

One way around this is to flatten/delimit the list first, then use the Substitute function of the Token Calculator activity on the result to avoid having to split and join things back together.

Step 1

Flatten the list of raw values with your desired delimiter

Step 2

Replace the underscores in that flattened value using substitute

You could probably combine these into a single step by having the formatted checkbox token directly in the substitute, but I usually keep things like this separate to make it more readable and to emphasize the fact that you have to flatten the list before using the substitution.

 

0 0
replied on August 31, 2023

That worked perfectly. Thank you so much! 

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.