Replaceable Values in List Options

Modified on Tue, 30 Apr 2024 at 09:12 AM

This article covers how replaceable values function within list options. Using replaceable values in list options allows you to populate lists options with the content from inputs completed in the form. For example you could ask the user completing the form to choose a primary contact from a list of contacts, with the list of contacts being pulled from inputs that have been previously entered into the form. 


For more of replaceable values in list options please check out the following examples.


Example 1: Single Replaceable Value


In this example we need to know who the primary contact is for the incident. The primary contact will either be the Supervisor, the Line Manager, or the Witness, but we want the name of the witness to appear in the list of options. 


To achieve this we can add a new value to the list which references the Witnesses Name element in this case {ELEMENT:witness_name} where "witness_name" is the name of the element. This then ensure that whatever the user types in to the Witness Name element appears in the list as a selectable option. See the example below. 


The format for the replaceable value is {ELEMENT:<element-name>} where <element-name> is the name of the element.



Example 2: Multiple Replaceable Value


In this example we have taken Example 1 but split Witness name into two elements Witness First Name and Witness Last Name. 


In this example we are updated the primary contact list option to reference both elements {ELEMENT:witness_first_name} {ELEMENT:witness_last_name} in both the label and the value. This will ensure that the Witness First Name and Witness Last Name inputs appear as an option in the Primary Contact list. 




Example 3: Repeatable Set Replaceable Values


In this example we have taken Example 1 but moved the Witness Name into a Repeatable set so that the forms user can add multiple witnesses. We can then allow the forms user to choose from multiple different witnesses when selecting the Primary Contact. 


In this example we are updated the primary contact list option to reference the element inside the repeatable set {ELEMENT:witnesses|witness_name}.


The format for the replaceable value when in the repeatable set is {ELEMENT:<repeatable-set-name>|<element-name>} where <repeatable-set-name> is the name of the repeatable set and <element-name> is the name of the element.



Lists


Replaceable values will also work with when pulling your options from a List. As with the configuration in your custom options you will need to ensure that the format matches the above examples and the element names are correct. 



Getting Help

If you need any assistance with Replaceable Values please reach out through the Report Issue menu or email support@oneblink.io


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article