"has changed"); $Selected = $Rule["Conditions"]["Operator"]; PrintOptionList("F_Operator", $Items, $Selected); } function Rules_PrintNumericRuleOperator($Rule) { $Items = array( 1 => "has changed", 2 => "equals", 3 => "does not equal", 4 => "is less than", 5 => "is greater than", 6 => "is less than or equal to", 7 => "is greater than or equal to"); $Selected = Rules_GetRuleOperator($Rule); PrintOptionList("F_Operator", $Items, $Selected); } function Rules_PrintFlagRuleOperator($Rule) { $Items = array( 1 => "has changed", 8 => "is set to true", 9 => "is set to false"); $Selected = Rules_GetRuleOperator($Rule); PrintOptionList("F_Operator", $Items, $Selected); } function Rules_PrintControlledRuleOperator($Rule) { $Items = array( 1 => "has changed", 10 => "is changed to"); $Selected = Rules_GetRuleOperator($Rule); PrintOptionList("F_Operator", $Items, $Selected); } function Rules_PrintUserRuleOperator($Rule) { $Items = array( 1 => "has changed", 11 => "is changed to"); $Selected = Rules_GetRuleOperator($Rule); PrintOptionList("F_Operator", $Items, $Selected); } function Rules_PrintFileRuleOperator($Rule) { $Items = array( 1 => "has changed", 13 => "file added"); # since "file added" is currently unsupported unset($Items[13]); $Selected = Rules_GetRuleOperator($Rule); PrintOptionList("F_Operator", $Items, $Selected); } function Rules_PrintNoRuleValue($Rule) { ?> (none) GetField($Rule["Conditions"]["FieldId"]); $InterfaceToggleThreshold = 45; $ValueCount = $Field->GetCountOfPossibleValues(); if ($ValueCount > $InterfaceToggleThreshold) { if ($Rule["Conditions"]["Value"]) { $Schema = new MetadataSchema(); $Field = $Schema->GetField($Rule["Conditions"]["FieldId"]); $PossibleValues = $Field->GetPossibleValues(); $Value = $PossibleValues[$Rule["Conditions"]["Value"]]; $Rule["Conditions"]["Value"] = $Value; } DisplayTermUsingSearch($Rule); } else { DisplayTermUsingList($Rule); } } function Rules_PrintUserRuleValue($Rule) { $Schema = new MetadataSchema(); $Field = $Schema->GetField($Rule["Conditions"]["FieldId"]); $InterfaceToggleThreshold = 45; $ValueCount = $Field->GetCountOfPossibleValues(); if ($ValueCount > $InterfaceToggleThreshold) { if ($Rule["Conditions"]["Value"]) { # value needs to be the user name $User = new CWUser($Rule["Conditions"]["Value"]); $Rule["Conditions"]["Value"] = $User->Name(); } DisplayTermUsingSearch($Rule, "users"); } else { DisplayTermUsingList($Rule); } } # ----- LOCAL FUNCTIONS ------------------------------------------------------ function Rules_PrintRuleEnabled($Rule) { $YesChecked = $Rule["Enabled"]; $Checked = ' checked="checked"'; ?> /> Yes /> No GetField($Rule["Conditions"]["FieldId"]); $RuleId = $Rule["RuleId"]; # retrieve all possible values $PossibleValues = $Field->GetPossibleValues(); # sort values asort($PossibleValues); # retrieve value currently selected $Value = $Rule["Conditions"]["Value"]; if ($Field->Type() == MetadataSchema::MDFTYPE_USER) { $Value = $Value instanceof User ? $Value->Id() : $Value; } # set up javascript function to dynamically populate option lists $DBFieldName = $Field->DBFieldName(); PrintOptionList( "F_Value", $PossibleValues, $Value); } function DisplayTermUsingSearch($Rule, $Context=NULL) { $Schema = new MetadataSchema(); $Field = $Schema->GetField($Rule["Conditions"]["FieldId"]); # retrieve field name/id and values currently selected $RuleId = $Rule["RuleId"]; $DBFieldId = $Field->Id(); $Value = defaulthtmlentities($Rule["Conditions"]["Value"]); # print search input/text container for use in selecting additional name ?> <?PHP print $Value; ?>
" />

#

An e-mail template is required, but no e-mail templates have been created. Create an e-mail message template.

Rule Options
Enabled |
Condition
Field |
Operator |
> | Value |
Action
Type |
To | Either users with or users that are the value of Note: If both are set, only the value of the users that are a value of field will be saved.
> | E-mail Template | An e-mail template is required, but no e-mail templates have been created. Create an e-mail message template.

" /> Remove Rule