TriggerUIFormat

Public Function TriggerUIFormat(trig As String) As String

 

When HS needs to display an event, it needs to describe the trigger. When an event is set to be triggered by an event from your plug-in, this function is called to format the trigger. The passed string is the string that is saved when the user configures the trigger in the event properties. The control values are saved in the string in the order they were returned by the TriggerUI function. The parameters of the string are separated with a Chr(2) character.

 

The parameters to the string are:

Parameter 0: name of plug-in

This is used mainly by HS so it knows who owns the trigger. It is normally not used in this function.

Parameter 1: trigger name

The name assigned to this trigger. Normally not needed here.

Parameter 2: value of first control

Parameter N: value of subsequent controls.

 

Note that the values of the controls are the text values as given in the TriggerUI() function. If a user selected "zone 1", this is the value for that control.

Example. Assuming a trigger dialog as formatted in the TriggerUI example, a possible trigger string passed to this function might be:

"ACME Security Panel" &  Chr(2) & "Panel Trigger" & Chr(2) & "zone 1" & Chr(2) & "Closed" & Chr(2) & “notes here”

This function would return the formatted trigger as:

“Zone: zone 1 action is: Closed and notes are: notes here”