Query parameters offer the following features:
- Set filters for the data in a list
- Hide query parameters
To set up query parameters you’ll need to:
- Have a screen with a list from data source
- Have a screen with a list that links to the LFD screen
- Add the query parameter to the link action
Step 1 – Have a screen with a list from data source
- Create your LFD and configure this how you wish. For more on LFD’s see here.
- Click your LFD to open the “configure your list” settings and make sure to select “allow users to filter the list”.
- Add the fields you want to have filters for.
Step 2 – Have a screen with a list that links to the LFD screen
- Once you have created your menu screen or link to the LFD, click on the list to set up your links.
– Other links can be: buttons, text links, list with small/large thumbnails, grid, panels.
- Under “Link action” select Display another screen.
- Select the screen which has your LFD.
- Below the screen name, click on the blue “Add query parameters” link.
Step 3 – Add the query parameter to the link action
There are various types of queries you can use. We will explain four commonly used scenarios below:
- How to open the LFD, with a filter applied.
- How to open the LFD, with two filter values applied.
- How to open the LFD, filtering two columns with specific values.
- How to open the LFD with the query and hide the filter bar.
1. How to open the LFD, with a filter applied
- Click the list item to open the “configure your list settings” menu.
- For example, to filter only people (in a people directory) who live in London, enter the following text in the field for your query parameter under Add query parameters: dynamicListFilterValue=London
- Change the value “London” to the value that you are using to filter your list.
- Click on the blue “Save & Close” button.
- Go to “Preview” mode.
- Click on the list item to test that it goes to the correct screen with the LFD, and correctly filters the data.
2. How to open the LFD, with two filter values applied
- If you wanted to filter the people who live in London AND Tokyo for example, the process is the same as listed in the How to open the LFD, with a filter applied section, but in the query parameters, the locations are separated by a comma.
- Note, any field names that have spaces or punctuation need to be encoded first.
- To do this Select the “URL encoding tool and type the field name into the text box and click encode.
- Copy the data and add it to your query.
- For this example, the query would be: “dynamicListFilterValue=London,Tokyo”.
- Click the blue “Save & Close” button.
- To test, in preview mode the testing procedure is the same as before, but when the filter is applied, this time you should be able to see all entries on the directory screen in London AND Tokyo.
3. How to open the LFD, filtering two columns with specific values
- To use two different filters, for example, we will use location and age, the process is the same as listed in the How to open the LFD, with a filter applied, but the query parameters are different.
- Use the following query: dynamicListFilterColumn=Name,Age&dynamicListFilterValue=John,29
- This will load data where the column “Name” is John, and the column “Age” is 29. The first column and the first value must be a match, and the second column and the second value must be a match.
- If you add the following at the end of your query it means the directory entries must exactly match the name John and be equal to 29 years old: &dynamicListFilterLogic=contains,%3C
- Click the blue Save & Close button.
- To test, in preview mode the testing process is the same as before, but when the filter is applied, you should be able to see entries on the directory screen that satisfy both the name AND age parameters of the query.
4. How to open the screen with the query and hide the filter bar.
- To apply your query but hide the filter bar you will need to end your query with the following: &dynamicListFilterHideControls=true
- Add it to the end of a query, like this: dynamicListFilterValue=London&dynamicListFilterHideControls=true
- Click the blue “Save & Close” button.
- Go to Preview mode.
- Click on the list item.
- On the directory screen, make sure the list only shows the relevant items but that the filter bar isn’t visible.