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

Question

Question

Save Check box values to SQL

asked on June 11, 2019 Show version history

I have a form where I list a bunch of counties and I assigned them values like C1, C2, C3. I would like to write these values to SQL when they are selected. Currently I have them writing to SQL as a single line but I'l like each value checked to be a separate line entry in SQL. Right now I'm reading the values from the template but I've tried the Retrieve Business Process Variables task but I couldn't get that to work either.  Here is what I have so far. Thanks

SQL.png
SQL.png (92.15 KB)
0 0

Replies

replied on June 11, 2019

That's likely because you're iterating over a single value token. I'm guessing the field you're reading in Retrieve Field Values is not a multi-value field?

If you create a multi-value token from your "county" field by splitting it on the comma, then you can iterate over this multi-value token and have the individual values of the checkboxes.

0 0
replied on June 12, 2019

Thanks for the response Miruna. 

I set the token to a multi value but how would I split by the comma. I've attached screenshots of the workflow. Also should I be using the For Each Value tool? thanks Joel

Workflow.docx (404.09 KB)
0 0
replied on July 29, 2019

Sorry for the late reply.

You don't need to create an extra token from the multi-value field. You can use %(RetrieveFieldValues_Service Area_All) directly in For Each Value.

When you set the County field in Insert Data, use the current value token for itgenerated from For Each Value. (You are using %(token 1) which is a multi-value token in a single value field, so Workflow uses the first value of it since it doesn't know which one you want)

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

Sign in to reply to this post.