Tag: ExecuteInPreset 

The ExecuteInPreset parameter executes a script action while the preset is being made (sapio365 job center only as of 09/2020), even if it is not inside a PreparePreset block.
The action is also executed during a regular job run. It is mostly useful for SetVar to avoid duplcating the same SetVar in the script to its PreparePreset block.

<ExecuteinPreset/>
XML

Detailed Description

ExecuteInPreset is available for the following actions:

  • SetVar
  • SetVarListFromGridSelection
  • CalcVar
  • SetVarListSize
  • SetVarValidFilePath
  • SetVarFromListValue
  • SetVarListsFromGridColumns
  • SelectFromList
  • FilterFromList

Example Script

<ytriaAutomation>
	<setvar vJobName="My test job" ExecuteInPreset="true"/><!-- executed at preset time AND at job run time -->
	<setvar vAnotherV="My nave is V"/><!-- executed only at job run time -->
	<PreparePreset>
		<setvar vPresetV1="PRESET VAR1"/><!-- executed only at preset time -->
		<setvar vPresetV2="PRESET VAR2" ExecuteInPreset="true"/><!-- executed only at preset time - it is pointless to use ExecuteInPreset inside PreparePreset -->
	</PreparePreset>
	<userinput Title="Ask me more questions for {%vJobName%}">
		<Variable name="state1" Type="label" label="This user job is a test for presets:"/>
		<Variable name="vu1" value="" Label="This user data:" />
		<Variable name="vu2" value="" Label="That user data:" />
	</userinput>
	<MsgBox Title="{%vJobName%}" Message="v1={%v1%} v2={%v2%}" MessageExtended="vu1={%vu1%} vu2={%vu2%}" Type="eXclamation"/>
</ytriaAutomation>
XML