Ytria logo DOCUMENTATION
⚠ This page requires javascript enabled in browser
Automation / All products Automation / Global Actions / Logic Actions

 

Tag: KeepAlive

The KeepAlive attribute lets you set a given dialog to stay open, awaiting user input (often a confirmation), within your automation script. It can be coupled with any action that triggers a dialog in the UI.

<Values KeepAlive="True">

    <SetParam Target="SelectDocumentItems" Field="AddItem" value="Subject"/>
    <SetParam Target="SelectDocumentItems" Field="AddItem" value="$Fonts"/>
    <SetParam Target="SelectDocumentItems" Field="AddItem" value="Status"/>
</Values>

Attributes Values

AttributesAttribute ValueValue DescriptionComment
True

False

This

True will keep the next encountered dialog open and require user input to continue.

False is the default behavior; the dialog will close once the operation is completed

This (see detailed description)

Not mandatory
(see detailed description)

Detailed Description


The KeepAlive will behave differently depending on the value used and, in certain cases, will affect different dialog actions than that which it is coupled with.
The different values have the following functions/effects within your script:
    KeepAlive="False" is equivalent to the default behavior. All dialogs involved in your script will be closed upon the completion of operations using them.


    KeepAlive="True" will trigger the next dialog to remain open, awaiting a user input (e.g. clicking on the "OK" button in the dialog).

        NoteThis will not necessarily affect the dialog whose action it is coupled with.
        See example below.
        In the script above, the KeepAlive attribute is used on the Values action. But because it will affect the next dialog encountered in the script, it will affect the Export action dialog—this dialog will be kept open awaiting user input.


    KeepAlive="This" will trigger only the dialog corresponding to the action in which the KeepAlive is used to stay open.



        In the script above, because KeepAlive="This" , only the Values dialog will be kept open.


Special Attribute Value: {{SKIP}}

The attribute value {{SKIP}} can be used in place of a SetParam option value, using the default setting.

For example, the following two script blocks are equivalent:

<Export keepAlive="this">
<SetParam field="FilePath" value="D:\temp-exports\acl-ExportMainGrid-TextSelectedRows.xlsx"/>
<SetParam field="OpenFileOnceGenerated" value="{{SKIP}}"/>
</Export>

and

<Export keepAlive="this">
<SetParam field="FilePath" value="D:\temp-exports\acl-ExportMainGrid-TextSelectedRows.xlsx"/>
</Export>

Tip As shown above omitting a SetParam option line for a dialog action will result in its option setting being ignored. But, the {{SKIP}} attribute can be useful when setting IF conditions.