%META:TOPICINFO{author="TWikiContributor" date="1429159273" format="1.1" version="$Rev$"}%
%META:TOPICPARENT{name="IfThenActionPlugin"}%
---+ If-Then-Action Rules
%STARTSECTION{type="templateonly"}%
<div class="twikiBroadcastMessage">
%X% __NOTE:__ This is a template topic, __do not use__. Define if-then-action rules in %IF{
 "istopic '%USERSWEB%.IfThenActionRules'"
 then="[[%USERSWEB%.IfThenActionRules]]"
 else="<nop>%USERSWEB%.IfThenActionRules ([[%SCRIPTURL{edit}%/%USERSWEB%/IfThenActionRules?templatetopic=%SYSTEMWEB%.IfThenActionRulesTemplate;topicparent=none;nowysiwyg=1][create this topic]])."
}%
</div>
%ENDSECTION{type="templateonly"}%
This topic defines if-then action rules. The actions are handled by the %SYSTEMWEB%.IfThenActionPlugin.

%EDITTABLE{%IFTHENFORMAT%}%
| *If* | *Source* | *Then* | *Target* | *Comment* |
|  |  |  |  |  |
|  |  |  |  |  |
|  |  |  |  |  |
|  |  |  |  |  |
|  | Sandbox tests: |  |  |  |
| save | Sandbox.IfThenActionTest | email | Sandbox.IfThenActionEmailTemplate | This sends an e-mail based on the target template when the source topic is updated |
| save | Sandbox.IfThenActionTest | setformfield | $children(1 If*)/$formfield(Number) = $formfield(Number) | This updates all children's Number form field to the current topic's Number form field |
| save | Sandbox.IfThenActionTest | touch | Sandbox.IfThenActionTouch | This does an edit & save of the target topic |
| save | Sandbox.IfThenActionTest | view | Sandbox.IfThenActionView | This does a normal topic view |
| save | Sandbox.IfThenActionTest | viewdaemon | Sandbox.IfThenActionViewDaemon | This does a daemon view, e.g. is non-blocking |
%IFTHENHELP%

__Access control:__

   * Set ALLOWTOPICCHANGE = %USERSWEB%.TWikiAdminGroup

__Related:__ %SYSTEMWEB%.IfThenActionPlugin

%META:PREFERENCE{name="IFTHENFORMAT" title="IFTHENFORMAT" type="Set" value="%25INCLUDE%7b %22%25SYSTEMWEB%25.IfThenActionPlugin%22 section=%22ifThenEditTable%22 %7d%25"}%
%META:PREFERENCE{name="IFTHENHELP" title="IFTHENHELP" type="Set" value="%25INCLUDE%7b %22%25SYSTEMWEB%25.IfThenActionPlugin%22 section=%22ifThenColumnsHelp%22 %7d%25"}%
