gestaltpnid:gestalt_pnid:event_manager_reference
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
gestaltpnid:gestalt_pnid:event_manager_reference [2024/04/12 12:59] – su | gestaltpnid:gestalt_pnid:event_manager_reference [2024/05/01 16:01] (current) – su | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Event Manager====== | + | ======= Event Manager |
- | ====Script Reference==== | + | =====Introduction===== |
- | ===Change Property=== | + | In Gestalt PnID's Event Manager we provide several helper functions that help you perform specific actions within your dashboard. This page outlines what each of these functions are, what they do, and information on how they can be used within the event manager. |
+ | |||
+ | =====Script Reference===== | ||
+ | |||
+ | ====Change Property==== | ||
Changes the value of the specified property on a component to the specified value. | Changes the value of the specified property on a component to the specified value. | ||
Line 16: | Line 20: | ||
| Property Value | any | The value to set the property to. |Yes | | | Property Value | any | The value to set the property to. |Yes | | ||
- | ===Set Position=== | + | ====Set Position==== |
Changes the position of a component to the provided XY co-ordinate. | Changes the position of a component to the provided XY co-ordinate. | ||
Line 30: | Line 34: | ||
| Property Value | numeric | | Property Value | numeric | ||
- | ===Set Query=== | + | ====Set Query==== |
Changes the query settings of the dashboard. | Changes the query settings of the dashboard. | ||
Line 45: | Line 49: | ||
| Data Function| string | | Data Function| string | ||
- | ===Write Value=== | + | ====Write Value==== |
Writes a value to the snapshot of the specified tag. | Writes a value to the snapshot of the specified tag. | ||
Line 63: | Line 67: | ||
| Fail Callback | | Fail Callback | ||
+ | ====Get Value==== | ||
+ | |||
+ | Retrieves the value for the specified tag. | ||
+ | |||
+ | ==Method Signatures== | ||
+ | < | ||
+ | getValue(" | ||
+ | </ | ||
+ | |||
+ | ^ Parameter | ||
+ | | Data Source | ||
+ | | Tag Name | string| The name of the tag to retrieve the value for. |Yes | | ||
+ | | Use Selected | ||
+ | | Index | boolean| The index of a specific value in the data array to return. If Use Selected is true this will have no effect. | ||
+ | |||
+ | ====Get String Value==== | ||
+ | |||
+ | Retrieves the string value for the specified tag. | ||
+ | |||
+ | ==Method Signatures== | ||
+ | < | ||
+ | getStringValue(" | ||
+ | </ | ||
+ | |||
+ | ^ Parameter | ||
+ | | Data Source | ||
+ | | Tag Name | string| The name of the tag to retrieve the string value for. |Yes | | ||
+ | |||
+ | ====Get Tag Data==== | ||
+ | |||
+ | Retrieves the entire data array for the specified tag. | ||
+ | |||
+ | ==Method Signatures== | ||
+ | < | ||
+ | getTagData(" | ||
+ | </ | ||
+ | |||
+ | ^ Parameter | ||
+ | | Data Source | ||
+ | | Tag Name | string| The name of the tag to retrieve the data for. |Yes | | ||
+ | |||
+ | ====Get Timestamp==== | ||
+ | |||
+ | Retrieves the latest timestamp for the specified tag. | ||
+ | |||
+ | ==Method Signatures== | ||
+ | < | ||
+ | getTimeStamp(" | ||
+ | </ | ||
+ | |||
+ | ^ Parameter | ||
+ | | Data Source | ||
+ | | Tag Name | string| The name of the tag to retrieve the latest timestamp for. |Yes | | ||
+ | |||
+ | ====Swap Tags==== | ||
+ | |||
+ | Swaps out the current set of tags present in the page for a new set. | ||
+ | |||
+ | ==Method Signatures== | ||
+ | |||
+ | < | ||
+ | swapTags(" | ||
+ | </ | ||
+ | |||
+ | ^ Parameter | ||
+ | | Tag List | array| The collection of tag names to swap out the existing with. Must be of the same length as the existing tag list. | Yes | | ||
+ | | Data Sources | array| The collection of data source names to swap out the existing with. Must be of the same length as the existing tag list. If not specified it will assume the tags are from the same data source. | ||
+ | |||
+ | < | ||
+ | swapTags(" | ||
+ | </ | ||
+ | |||
+ | ^ Parameter | ||
+ | | Tag List | array| The collection of tag names to swap out the existing with. Must be of the same length as the target list | Yes | | ||
+ | | Tags to Target | array| The collection of tag names to target for replacement with the new tags. |Yes| | ||
+ | | Data Source to Target | string| The data source of the tags to target. If no data source is provided it will match by the tag name only. |No| | ||
+ | |||
+ | < | ||
+ | swapTags(" | ||
+ | </ | ||
+ | |||
+ | ^ Parameter | ||
+ | | Tag List | array| The collection of tag names to swap out the existing with. Must be of the same length as the target list. | Yes | | ||
+ | | Data Sources | ||
+ | | Tags to Target | array| The collection of tag names to target for replacement with the new tags. |Yes| | ||
+ | | Data Source to Target | string| The data source of the tags to target. If no data source is provided it will match by the tag name only. |No| | ||
+ | |||
+ | ====Transform Tags==== | ||
+ | |||
+ | Applies a transform to the names of the tags present in the page. | ||
+ | ==Method Signatures== | ||
+ | |||
+ | < | ||
+ | transformTags(" | ||
+ | </ | ||
+ | |||
+ | ^ Parameter | ||
+ | | Value to be Transformed | string| The substring to target for transformation. | ||
+ | | New Value | string| The new value you want to replace the target string with. | Yes | | ||
+ | | Data source | string| The data source of the tags you want to target. If none is provided it will target the whole set. | No | | ||
+ | |||
+ | ====Get Page State==== | ||
+ | |||
+ | Retrieves a value under the given key from the page state store. | ||
+ | ==Method Signatures== | ||
+ | |||
+ | < | ||
+ | getPageState(" | ||
+ | </ | ||
+ | |||
+ | ^ Parameter | ||
+ | | key | string| The key of the value you want to retrieve from the page state. | ||
+ | |||
+ | ====Set Page State==== | ||
+ | |||
+ | Sets a value under the given key from the page state store. | ||
+ | ==Method Signatures== | ||
+ | |||
+ | < | ||
+ | setPageState(" | ||
+ | </ | ||
+ | |||
+ | ^ Parameter | ||
+ | | key | string| The key you want to store the value against. | ||
+ | | value | any| The value you want to store against the key. | Yes | | ||
+ | |||
+ | ====Get Component==== | ||
+ | Retrieves the object reference of the component matching the specified ID. | ||
+ | ==Method Signatures== | ||
+ | |||
+ | < | ||
+ | getComponent(" | ||
+ | </ | ||
+ | |||
+ | ^ Parameter | ||
+ | | Component Id | string| The id of the component you want to retrieve. |
gestaltpnid/gestalt_pnid/event_manager_reference.1712926747.txt.gz · Last modified: 2024/04/12 12:59 by su