What data shape and properties do I need to return for a Template Variable options?
I’ve tried a few, but couldn’t figure it out.
e.g. { “data”: [‘TemplateName1’,‘TemplateName2’] }
What data shape and properties do I need to return for a Template Variable options?
I’ve tried a few, but couldn’t figure it out.
e.g. { “data”: [‘TemplateName1’,‘TemplateName2’] }
Just an array of values or key value pairs.
Just values:
["upper_25", "upper_50", "upper_75", "upper_90", "upper_95"]
Key values:
[ { "text" :"upper_25", "value": 1}, { "text" :"upper_75", "value": 2} ]
Thanks…got it sorted.
can you please describe format a little more? what is text, what is value, how it used?
currently writing plugin for internal datasource and docs has nothing about that
@restfulblue there isn’t really much more to describe. The format is what a dropdown needs. The first format with just strings will result in a dropdown where the label and value are the same. The second format results in a dropdwon where text
is the label and value
is the value.
This is what the above json looks like in a template variable dropdown:
Fixing my plugin for version 5.2.0
The way to make it work is by returning an array of objectects with at least one property called text
[{ "text" :"upper_25"},{ "text" :"upper_26"},...]