Assign Button
Stores the result of an expression.
Demo
Basic example
Attributes
Attribute | Type | Description |
---|---|---|
type | string | Type expected is scriptButton |
See section Common attributes.
Extra attributes
Attribute | Type | Description |
---|---|---|
autoExecute | boolean | If true, the script will execute automatically when the form is displayed |
timer | number | Number of ms to wait before automatically calling again |
text | string | Text shown inside the button |
script | string | Expression whose result will be assigned. |
Events
Event | When | Additional | Cancellable |
---|---|---|---|
Button.click | Any button is clicked | Definition + State | Yes |
See section Events for more information.
When to use it
- When you want to set a variable when the user clicks a button.
- When you want to set a variable when a panel is rendered, for example inside a wizard. To do that you can place the button inside a panel and set its visibility to false and autoExecute to true.
- To have a "calculated variable" setting autoExecute and timer.