User Tools

Site Tools


gestaltpnid:gestalt_pnid:event_manager_reference

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
gestaltpnid:gestalt_pnid:event_manager_reference [2024/04/12 13:26] sugestaltpnid:gestalt_pnid:event_manager_reference [2024/05/01 16:01] (current) su
Line 1: Line 1:
-======= Event Manager=======+======= Event Manager ======= 
 +=====Introduction===== 
 + 
 +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===== =====Script Reference=====
  
Line 122: Line 126:
  
 ==Method Signatures== ==Method Signatures==
 +
 +<code>
 +swapTags("[TagList]", "[Data Sources]")
 +</code>
 +
 +^ Parameter      ^ Type            ^ Description        ^ Required? ^
 +| 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.  |No|
 +
 +<code>
 +swapTags("[TagList]", "[Tags To Target]", "[Data Sources to Target]")
 +</code>
 +
 +^ Parameter      ^ Type            ^ Description        ^ Required? ^
 +| 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|
 +
 +<code>
 +swapTags("[TagList]", "[Data Sources]", "[Tags To Target]", "[Data Source to Target]")
 +</code>
 +
 +^ Parameter      ^ Type            ^ Description        ^ Required? ^
 +| 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  | array| The collection of data source names to swap out the existing with. Must be of the same length as the target tag 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|
  
 ====Transform Tags==== ====Transform Tags====
Line 127: Line 158:
 Applies a transform to the names of the tags present in the page. Applies a transform to the names of the tags present in the page.
 ==Method Signatures== ==Method Signatures==
 +
 +<code>
 +transformTags("[Value to be Transformed]", "[New Value]", "[Data Source]")";
 +</code>
 +
 +^ Parameter      ^ Type            ^ Description        ^ Required? ^
 +| Value to be Transformed | string| The substring to target for transformation.   | Yes |
 +| 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==== ====Get Page State====
Line 136: Line 176:
 getPageState("[key]") getPageState("[key]")
 </code> </code>
 +
 +^ Parameter      ^ Type            ^ Description        ^ Required? ^
 +| key  | string| The key of the value you want to retrieve from the page state.   | Yes |
  
 ====Set Page State==== ====Set Page State====
Line 145: Line 188:
 setPageState("[key]", "[value]") setPageState("[key]", "[value]")
 </code> </code>
 +
 +^ Parameter      ^ Type            ^ Description        ^ Required? ^
 +| key  | string| The key you want to store the value against.   | Yes |
 +| value | any| The value you want to store against the key.   | Yes |
  
 ====Get Component==== ====Get Component====
Line 154: Line 201:
 </code> </code>
  
 +^ Parameter      ^ Type            ^ Description        ^ Required? ^
 +| Component Id | string| The id of the component you want to retrieve.   | Yes |
gestaltpnid/gestalt_pnid/event_manager_reference.1712928384.txt.gz · Last modified: 2024/04/12 13:26 by su