Query Variables allow the results of a Query to be dependent on a variable input. This means that the Query could rely on, for example, a dropdown in a Model. Changing the chosen option on the dropdown would change the result set of the Query.
Using variable Queries reduces the need to create multiple similar Queries, as they can be reused.
Creating a Variable Query
The Starting Block and Where Expressions have a small downwards arrow next to where values can be added.
This arrow will be replaced by when Variable is selected. Clicking on this icon will bring up the drop down menu allowing you to swap back to using a value.
- Click on the arrow next to the value area.
- Select Variable from the dropdown.
- Name the variable.
- This makes it easier to refer to later.
Testing a Variable Query
The variables you use to test the query will be of a specific type. The type depends on the method of input the variable takes. For example, this could be Elements, pick lists, text, numbers or radio buttons.
- Open the test tab located in the window on the right
- Set the variables you want to use
- The way to do this varies depending on the method of input the variable takes
- Click Test
Comments
0 comments
Please sign in to leave a comment.