Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When you build your CommCare application, you can define the screen that will direct users after they submit a form instead of returning to the home screen. This feature is called End of Form Navigation, and it offers four options for users to choose from, depending on the application configuration: Home Screen, First Menu, Previous Screen, and Link to another form or menu.

...

Table of Contents:

Table of Contents
minLevel1
maxLevel6
outlinefalse
stylenone
typelist
printabletrue

...

If you select "Link to another form or menu" you will need to specify a target form and may need to set up a conditional expression to determine whether the form should be presented to the user. Here's how:

...

Target Form

Specify the form that will open once the user submits the current form.

Linking Data

If the target form is located in a module that caters to a different case type than the current form, you may need to specify the case_id of the case that CommCare will need to load. In most scenarios, if the case_id is the same as the current form, Commcare can manage this independently, and no user intervention is required.

...

Multiexcerpt include macro
macro_uuid846f10d6-3459-462c-8ce9-b12bb0b90265
nameTechnical Documentation
templateDataeJyLjgUAARUAuQ==
page[Internal] CommCare Public ManagementCommCare Help Site Design Guidance
addpanelfalse

If the decision to link to the target form is dependent on a condition being met, you will need to specify a conditional expression. This expression must return a boolean value (true or false). Note that in the context of the form link conditional expression, form content is unavailable, so the expression must rely solely on case properties.

...

Note: The Case ID is not always referenced in the session as case_id, this varies depending on the form and module configurations. 

Advanced Concepts

Multiexcerpt include macro
macro_uuid846f10d6-3459-462c-8ce9-b12bb0b90265
nameTechnical Documentation
templateDataeJyLjgUAARUAuQ==
page[Internal] CommCare Public ManagementCommCare Help Site Design Guidance
addpanelfalse

Form linking is conditional on a case property being met, the XPath Expression must reference the specific case from the casedb.

  • The default XPath reference to a case_id that's been loaded into a form context is instance('commcaresession')/session/data/case_id. You can reference case properties from this case by using the following example syntax:

    • instance('casedb')/casedb/case[@case_id = instance('commcaresession')/session/data/case_id]/link_form = 'yes'

  • It's possible to load multiple cases into the same form. This means that there is no default syntax for referencing these cases. To see what data exists in your session hash, you can: 1) Go to App Preview, 2) Open the form you're linking from, 3) Click on "Menu" and select "Evaluate XPath", 4) Type instance('commcaresession')/session. This will display all the data that you can reference from the session hash. See the following example syntax:

    • instance('casedb')/casedb/case[@case_id = instance('commcaresession')/session/data/case_id_new_qi_report_0]/next_step = 'indicateurs'

Limitations

There are some limitations to End of Form Navigation:

...