How to transfer data from one Formotus form to another Formotus form

Overview

You can share data between different Formotus forms or between different drafts of the same form. Some use cases include:

  • Filling out multiple drafts of the same form that all include a set of common data the user shouldn't need to fill repeatedly.
  • While filling one form be able to initiate a different process by opening a different form and transferring data to it.
  • Tackling the challenge of a giant form by splitting it into multiple forms that gather the data cumulatively.

 

Getting Started

Create an InfoPath rule on a button to open a new file for filling out.

When prompted for a Form Template ID or Location, enter instead a special Formotus syntax starting with the name of the form installed on the user's device (that's the name you gave it when you uploaded your XSN to the cloud console).

Syntax

The syntax specifies first the name of the form to launch then a list of pairs of XPath node names separated by ampersands:

[form_name]?[xpath_child_form]=[xpath_parent_form]&[xpath_child_form]=[xpath_parent_form]

In this way, the values of data fields in the parent form are passed to the child form when it is opened. Data fields can be specified individually or a whole tree of the data structure can be passed by specifying a group to pass.

Notes:

  1. These XPath expressions are case-sensitive.
  2. The total length cannot exceed 255 characters.
  3. The named child form must already be installed on the user's device. Replace spaces in the name with %20.
  4. The data types of the parent/child fields must match (text, integer, etc.)
  5. The names of the root nodes do not need to match, but the names of any subnodes of a group node do need to match. That said, we recommend keeping it simple and using data structures that match in the parent and child forms.

Demo Forms

Two forms are available to demonstrate this data transfer technique. DataPassing1 and DataPassing2 have identical data structures.

 

Each form has a button with a rule that passes both a group node (PassThese) and a data field node (PassThisField). The rule in DataPassing1 is like this:

DataPassing2?/my:myFields/my:PassThese=/my:myFields/my:PassThese
&/my:myFields/my:PassThisField=/my:myFields/my:PassThisField

 

 

 

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.