When you create a report, you may want to allow users to specify values to key parameters to pull data specific to their request. This might be the name of a project, the name of a sprint or a list of sprints, a date range, or a boolean.
In the admin interface of VisualScript's Script Editor, you can specify these parameters, provide a description for the user, and even choose a default value.
The Script Parameter section of the Editor allows you to format and type variables that are passed to a JavaScript function with field tokens that are replaced by their values.
Field tokens are defined with matching double curly brackets:
{{param1}},{{param2}}
That set of field tokens sends a string separated by a comma:
<value of param1>,<value of param2>
Note that the comma is included. So the following string
{"Name":"{{Name}}","Title":"{{Title}}"}
produces the JSON:
{"Name":"<value of Name>","Title":"<Value of Title>"}
Variables that you define with curly brackets appear as fields in a form that is presented to the user.
You get to define the label for the field and a description.
By default, parameters are set to text, but you can define a type to restrict user input.
You can choose from Text, Number, Options List, Boolean, Date, Email, and Password.
For example, here are some parameters used in a product roadmap report:
This is presented to the user as form when they run the report:
Comments
0 comments
Please sign in to leave a comment.