Skip to main content
Skip table of contents

Editable Parameters

Let’s consider the following Query:

Screen of Query statement
Screen of Query parameters

Note that there’s 3 numeric parameters: excluded_author_a, excluded_author_b, and maximum_results. We want to exclude two IDs from our result and restrict the maximum number of results.

Sometimes, you want to make our Queries dynamic and give the users an option to change them directly from the Confluence page. You can solve this problem easily in the Macro configuration:

Screen of PocketQuery macro settings

Setting the Editable parameters radio button to “All” results in the following:

Screen of PocketQuery macro with editable parameters

Note that there’s 10 records because of the maximum results restriction and excluded authors with IDs 2 and 4.

When you set the Editable parameters option to “Selected”, page readers can only change the parameters you specifically allow. Any other parameters stay locked.

In our example, we made the maximum_results parameter editable:

Screen of PocketQuery macro settings

Now, page readers can choose how many results to display, but they cannot change which IDs are excluded:

Screen of PocketQuery Macro with only one parameter editable

Clear and Reset to Default

As of version 12.31.0, PocketQuery adds two additional buttons to parameter forms:

  • Clear - Removes all input values from the form fields.

  • Reset to Default - Restores default values defined by the query creator.

PocketQuery macro with parameter input showing three buttons used to control query filters on a Confluence page including Clear Reset to Default and Reload

These buttons are available alongside the Reload button and are useful when working with larger forms (e.g. 4–6 fields), or when users want to reset the form after multiple changes.

Parameter Names

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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.