Adding events
In order to control components (show/hide or enable/disable) in the dialog according to the state of a BoolToggle or a Bool, Event and EventGlobal actions can be used.
Event
Attributes | Attribute Value | Value Description |
---|---|---|
Target | N/A | Name of fields to control To target several fields with the same event, enter a semi-colon-seprated list: fieldA;fieldB;fieldC |
Mode | hideifeq / hideifnoteq / disableifeq / disableifnoteq | hideifeq - Hide if equal Only these exact strings are permitted |
Source | N/A | Name of field value that triggers the state change |
Value | True / False or 1 / 0 | True / False for BoolToggle type Other field types cannot be used as event source |
EventGlobal
Attributes | Attribute Value | Value Description |
---|---|---|
Source | N/A | Name of field value that triggers the state change |
<ytriaAutomation>
<Echo Mode="false"/>
<UserInput Title="User Input with events">
<Variable Name="Category" Type="Category" Label="A Category"/>
<Variable Name="Text" Value="This is a Text" Label="Text" Tooltip="Text tooltip"/>
<Variable Name="Bool" Type="Bool" Label="Bool" Value="true" Tooltip="Bool tooltip"/>
<Variable Name="BoolToggle" Type="BoolToggle" Label="BoolToggle" Value="false" Tooltip="BoolToggle tooltip"/>
<Variable Name="BoolToggle2" Type="BoolToggle" Label="BoolToggle (2)" Value="false" Tooltip="BoolToggle (2) tooltip"/>
<Event Target="Text" Mode="hideifeq" Source="Bool" Value="0"/>
<Event Target="BoolToggle2" Mode="disableifnoteq" Source="BoolToggle" Value="true"/>
<EventGlobal Source="BoolToggle"/>
</UserInput>
</ytriaAutomation>