Skip to Content
Support Hub

Assistant Building

Dynamically populate a choice list form field

Static choice list

If you have a specific number of options with values stored in form data, then you can use markup to reference those form data keys directly. For example, if the keys color1, color2, and color3 are set to "Red", "Blue", and "Green", then the options can be set to the following:

{{color1}}
{{color2}}
{{color3}}

They will then display to the user as "Red", "Blue", and "Green".

Dynamic choice list

In some cases, you may not know exactly how many values are available ahead of time because the information is generated or fetched dynamically. In these cases, you can use markup expressions to generate the options dynamically from form data.

For example, suppose you want to allow users to view information about recent ordered items. You've collected their email address or other account identifier and then used an Actions node to retrieve information about their recent orders which is now stored as a JSON object under the form data key recent-orders. The data looks something like this:

[
  {
    "id": 12064,
    "name": "Fulfillment order",
    "date": "2022-02-01",
    "items": [
      { "id": 34221, "name": "Item 1" },
      { "id": 34222, "name": "Item 2" }
    ]
  },
  {
    "id": 12025,
    "name": "Fulfillment order",
    "date": "2022-01-01",
  "items": [
      { "id": 34201, "name": "Item 3" }
    ]
  }
]

Within a dynamic choice list option, you could use the expression recent-orders to reference that array, the label {{$option["name"]}} ({{$option["date"]}}) to reference each order's name and date to display to the user, and the value {{$option["id"]}} to store that order's ID in form data.

With the above data, this would result in the user seeing the options "Fulfillment order (2022-02-01)" and "Fulfillment order (2022-01-01)", but the value stored by the choice list would be "12064" or "12025" respectively.

Need more help?

Ask a different questionMavenoid Support Hub
Select a different product
© 2025 Mavenoid ABSitemap
Terms of servicePrivacy policyCookie policyData processing agreement