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

Question

Question

Use Workflow to pass Forms checkbox to SQL

asked on November 3, 2022

I have a form with a checkbox field with multiple options with an abbreviation as each label's value. For example, the label "Field Operating Guideline" has a value of "FOG". I then have a workflow that assigns the checkbox values selected to a multivalue token and then writes that token to SQL. The problem I am running into is that the checkbox label is what is written to SQL, not the value. How can I get the value to write to SQL instead of the label? Screenshots and details are below.

 

The user selects checkbox values in Forms:

The completed instance shows the abbreviation as the value for the variable:

I have the variable selected in the Retrieve Business Process Variables activity:

Then it's assigned to the multivalue token

Then I have an Insert Data activity to write the token to SQL

SQL shows the selected label, not the abbreviation value.

 

0 0

Answer

SELECTED ANSWER
replied on November 9, 2022

I can confirm it's a bug with new layout forms. We'll look into addressing it in next month's update.

1 0

Replies

replied on November 3, 2022

That is how the values of checkbox fields are returned. One way to address this is to create a conditional decision in your workflow that looks at the value of tkType and updates SQL accordingly. For example, if tkType = "FOG", insert SQL FOG column with value "1" or "TRUE".

0 0
replied on November 3, 2022

Thanks for the reply. It seems counter intuitive that the label and not the value is what passes from Forms to Workflow for the checkbox, but I guess I will have to use a workaround. 

0 0
replied on November 9, 2022 Show version history

What version of Workflow and Forms are you using? I can't reproduce this behavior in the latest version 11.

This checkbox field in Forms

Produces these tokens in Workflow:

Side note, the token generated by Retrieve Business Process Variables for a checkbox field is already a multi-value token, it does not need to be assigned to a multi-value token.

Later edit: is your form using the new layout? Or is it a classic form? I can reproduce this behavior with a new layout form.

0 0
replied on November 9, 2022 Show version history

We are using V11/latest update for Forms and WF, and we are using the new layout form. Also, thank you for the sidenote.

0 0
SELECTED ANSWER
replied on November 9, 2022

I can confirm it's a bug with new layout forms. We'll look into addressing it in next month's update.

1 0
replied on January 6, 2023

This bug has been fixed with Forms 11 Update 3:

  • The checkbox selected values retrieved by workflow are now the correct values. (402493)

You can see other changes of Forms 11 Update 3 from  https://support.laserfiche.com/kb/1014413/list-of-changes-for-laserfiche-forms-11-update-3 and get Forms 11 Update 3 from Laserfiche 11 package  https://support.laserfiche.com/kb/1014263/software-versions-and-fixes-included-in-the-laserfiche-11-download-package

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

Sign in to reply to this post.