-
Notifications
You must be signed in to change notification settings - Fork 2
Lookup
The 'Lookup' property can be used on Radio, Select and Checkbox elements to retrieve Options from a different source. There are currently 3 types of Lookup: Answer Lookup, Dynamic Lookup, and Reusable Lookup.
Answer Lookup works along side the Retrieve External Data Action, it allows you to use a saved answer from an external request.
To use Answer Lookup, you need to add the 'Lookup' property follow by '#' and 'TargetQuestionid' ( see below ).
Property | Type | Required | Default Value | Description |
---|---|---|---|---|
Lookup | string | ❌ | ❌ | value must start with #{TargetQuestionid} |
"PageActions": [
{
"Type": "RetrieveExternalData",
"Properties": {
"TargetQuestionId": "isValidLookup",
"HttpActionType": "Post",
"PageActionSlugs": [
{
"Environment": "local",
"URL": "https://localhost:44399/api/v1/AdditionalBin?isValid={{radio}}",
"AuthToken": "TestToken"
}
]
}
}
```current page json
"Elements": [
{
"Type": "Checkbox",
"Lookup": "#isValidLookup",
"Properties": {
"Label": "Select your choices",
"QuestionId": "whatBin",
}
}
Dynamic Lookup works by retrieving options from an external source where the options will differ based on previous form answers. The URL can parse previous answers as parameters in the same way as Retrieve External Data does by enclosing the QuestionId in curly brackets eg. {{questionId}}. The retrieved options will NOT be stored in the answers, they are retrieved each time the page loads.
To use Dynamic Lookup, you need to set the 'Lookup' property to 'dynamic', and add an array of 'LookupSources' for each environment, to include the environment name, the provider (json is the only option currently), the url, and the auth token.
Property | Type | Required | Default Value | Description |
---|---|---|---|---|
Lookup | string | ❌ | ❌ | Set to 'dynamic' |
"Elements": [
{
"Type": "Checkbox",
"Lookup": "dynamic",
"Properties": {
"Label": "Select your choices",
"QuestionId": "whatBin",
"LookupSources": [
{
"EnvironmentName": "local",
"Provider": "Json",
"URL": "https://localhost/api/v1/lookup?question={{questionId}}",
"AuthToken": "Token"
}
]
}
}
Reusable Lookup allows the reuse of options saved in the json provider for certain element types list below. If a reusable lookup and options are declared the reusable lookup options will be appended after the options declared within the form itself.
To use Reusable Lookup, you need to set the 'Lookup' property to the name of the Reusable Lookup file stored in the json provider.
Property | Type | Required | Default Value | Description |
---|---|---|---|---|
Lookup | string | ❌ | ❌ | Set to the name of the file eg. 'councillors' |
"Elements": [
{
"Type": "Checkbox",
"Lookup": "councillors",
"Properties": {
"Label": "Select your councillor",
"QuestionId": "councillor",
"Options": [
{
"Text": "Extra councillor",
"value": "extra"
}
]
}
}
- Availability
- Actions
- Behaviours
- Breadcrumbs
-
Conditions
- String Conditions
- Date Conditions
- Integer Conditions
- File Upload Conditions
- Custom validation
-
Elements
- AddAnother
- Address
- Button
- Booking
- Checkbox
- Date Input
- Date Picker
- Declaration
- Document Download
- Document Upload
- File Upload
- H1-H6
- HR
- Image
- Inline Alert
- Link
- Map
- Multiple File Upload
- OrderedList
- Organisation
- P
- Radio
- Select
- Street
- Summary
- Success page
- Textarea
- Textbox
- Time input
- Unordered List
- Uploaded files summary
- Warning
- EnabledFor
- Feedback form
- File uploads
- Form Schema
- Header
- Inbound Values
- Integrating with PowerAutomate/0365
- Lookup
- Page
- Payment & Payment calculations
- Preview data structure
- Render conditions
- Reusable elements
- Structure tests
- Success page
- Tag parsers
- Target mapping
- Validators