I want to have two parameters in my workbook: type
and subtype
.
type
parameter value can be either "A" or "B" (Done using a static json ["A", "B"]
).
Values proposed in the dropdown for the subtype
parameter should be:
type
is "A"type
is "B"How to achieve that?
I have tried to play with the different query options available but to no avail.
To have one parameter depend on another, you reference that parameter in the query text (or other settings) of the second parameter.
here you can see i have a text parameter a
, with a value of 'test'.
then, in the parameter b
i reference that parameter like {a}
in the query text. whenever a
changes, the query in b
will rerun.
if you are using a json datasource, things get more tricky. you can really only use the parameters in the result settings tab in things like JSONPath expressions, but it is possible:
note the reference to the parameter in the jsonpath table expression (this determines the table rows in the results)
and also note that it explicitly returns only the id column (if you have a label, also add that. otherwise it will assume the "filter" column is the "label" column of the dropdown and you'll have N items with the same label.