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

Question

Question

Checkboxes on Forms: How to map efficiently to template fields when saving to repository?

asked on October 5, 2015

I have a checkbox on a Laserfiche form that allows multiple inputs (and there are many options).  When the "save to the repository" task occurs in my business process, each of these potential multiple inputs has a corresponding field on the template.  

So far, it appears that I can select the specific checked/unchecked value for each of the possible inputs in order to have them transferred to the appropriate template fields - for instance, in the "Configure Fields" dialog, I can set the value for each template field to the value for the corresponding checkbox, like so:

"Applications in use" is the variable associated with the checkbox in question, and V_105 is the corresponding value (right now I have both the "choices" and "values" columns filled out in my form design.)

I have two questions about this.

1) Is there a more efficient way to map the inputs from a multi-value checkbox to multiple different template fields in the repository?  There are quite a lot of potential inputs/template fields, and this may result in a very long set of field configurations at the beginning of my business process.

2) The metadata on my document shows "Checked" if the checkbox was checked and "Unchecked" if the checkbox was unchecked.  Is there a way to make it display "Yes" and "No" in the resulting metadata instead, perhaps with a workflow operation?  (We're hoping to use this metadata for reporting purposes later on).

Thanks in advance for any assistance you can offer!

0 0

Replies

replied on October 12, 2015 Show version history

Hi Lynette,

I recommend taking advantage of the “Retrieve Laserfiche Forms Content” activity in Workflow. Generally when you find yourself wanting more functionality for a Forms process, Workflow is the application to turn to. As this Answers post explains, the checkbox token from Retrieve Laserfiche Forms Content is a multi-value token containing the checked values. As a result, you can place the selected values directly into a metadata field. Your workflow will look something like this:

                            

  • In Retrieve Laserfiche Forms Content, retrieve the checkbox field
  • Search Repository finds the entry to which you wish to assign the metadata field
  • Change Starting Entry makes the located entry the starting entry. It’s not necessary, but I find it convenient.
  • In Assign Field Values, set your metadata field value to the retrieved checkbox field
    • The metadata field must be a multi-value field. This is set in the Admin Console
    • The field can be a text field or a list field, but note that if it’s a list field, you’ll have to update it every time the checkbox selections change
  • Track Tokens is also not necessary, but it’s useful for troubleshooting

 

If the target entry is the form you’re saving to the repository from Forms, then you’ll have to mark it in order to find it with the Search Repository activity. As the Answers post explains, I suggest using the form’s submission ID:

  • Create a metadata field called Submission ID
  • Add the field to the form’s metadata using Forms’ “Save to Repository” service task. Set its value to the Submission ID:

       

  •    Note that you can make this a hidden metadata field using metadata security in the Admin Console
  • In Workflow, set the search query to find that form via this Submission ID field:

       

 

You’ll have to do two more things to link the forms process to the workflow:

  • Kick off the workflow from Forms by adding the “Laserfiche Workflow” service task to the Forms process modeler:

       

  • Enable the workflow to use the Forms data by marking it as being started by Forms:
    • Either:
      • Right-click the workflow canvas and click “View Properties”
      • Click on the workflow canvas and in the right pane under Properties, click “View workflow properties”
    • In the General tab under Attributes, check “Started by Laserfiche Forms”

 

In the end, for a form field that looks like this:

the metadata will look like this:

 

Let us know if you have further questions!

0 0
replied on November 4, 2015

How did you get Choice_1 and not just True?

 

Thanks

Sandy

0 0
replied on November 4, 2015

Above is the list on my form.  Below is the result I get in the template.  how do I get it to say "Use Variance" when that box is checked, instead of True

 

0 0
replied on November 10, 2015

Hi Sandy,

In Assign Field Values, I set the metadata field (in this case PL-ApplicationType) to the form’s checkbox field from the Retrieve Laserfiche Forms Content activity:

If you’re getting True/False, you might be setting PL-ApplicationType to the individual choices (those tokens will have “Is Set” in their names).

I also noticed that PL-ApplicationType has dropdown arrows next to the values, whereas the multi-value field I’m using (“choices”) is a text field. It is possible to use a dropdown field, but the list values must be the exact format that Workflow stores them. For example, my checkbox values in Forms are "choice 1", "choice 2", "choice 3", and "choice 4". However, when they're stored by Workflow into the metadata, they're stored as "choice_1", "choice_2", etc. If in the Admin Console, my "choices" dropdown field has list options of "choice 1", "choice 2", etc., then they won't store from Workflow as they don't match exactly. Therefore, while setting up the process, I'd recommend using a text field as it's less restrictive. Once you get it working, then you can reformat appropriately and make things more restrictive. 

0 0
replied on November 10, 2015

If you're okay with having the values display in a field in a comma-separated list like so:

then you can configure the full process within Forms. In the Save to Repository service task of the process modeler, set PL-ApplicationType to the checkbox field option "List of all checked":

0 0
replied on December 6, 2016

I am trying to do this with LF Cloud which does not yet have Workflow available to use.  How can I map the different checkbox options to a multi value field?

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

Sign in to reply to this post.