Change Parameters Template Macro Option
If you’ve migrated from PocketQuery for Sever/DC, you might be already familiar with this Macro option, often referred to as a Change params template: https://help.livelyapps.com/pocketquery-for-confluence-server/Using-the-PocketQuery-Macro.824737802.html#UsingthePocketQueryMacro-Macroparameters. Since September 2021, the Cloud version of PocketQuery supports this option, too.
Let’s consider the following Query:
Note that we have 3 numeric parameters:
maximum_results. We want to exclude two IDs from our result and restrict the maximum number of results.
Sometimes, we want to make our Queries dynamic and give the users an option to change them directly from the Confluence page. From now on, we can solve this problem easily in the Macro configuration:
The result of this configuration is the following:
Note that we received 3 records because of the maximum results restriction and we excluded authors with IDs 1 and 3.
We can change this configuration by inserting new values into the form and hitting the Reload button:
In Query statements, we usually name our parameters using keys or camel case strings. However, in the template form, we want to have a human-readable label. PocketQuery automatically converts the key format to a label. All underscores (
_) are considered whitespaces and the next letter is capitalized. For example, parameter
my_first_id displays as
My First ID.