What can we improve?

Documentation

(Edit)

IPS_SetEventConditionDateRule

Requires: IP-Symcon >= 4.4

boolean IPS_SetEventConditionDateRule (integer $EventID, integer $ConditionID, integer $RuleID, integer $Comparison, integer $Day, integer $Month, integer $Year)

Parameters

EventID ID of the event to be changed
ConditionID ID of the condition that contains the rule
RuleID Unique ID for this group. IDs need to be unique for this condition only.
Comparison
Value description
0 ==
1 !=
2 >
3 >=
4 <
5 <=
Day Day with which the current date is compared
Month Month with which the current date is compared
Year Year with which the current date is compared

Returns

If the command succeeds, it returns TRUE, otherwise FALSE.

Description

This function modifies the rule with the ID RuleID of the condition with the ID ConditionID of the event with the ID EventID. The rule compares the current date with the Day, Month and Year, according to the comparison operation Comparison. If there is no rule with the ID RuleID, one will be created.

If one of the values Day, Month or Year <0, the rule with the ID RuleID will be deleted.

Day, month and year can be set to 0 and used as a wildcard

Which RuleID contains which rule can be looked up via IPS_GetEvent.

Example

//Add an AND condition
IPS_SetEventCondition(12345, 0, 0, 0)
 
// Adds / modifies the rule with the ID 2 for the event with the ObjectID 12345
// It is the first half of the year -> current date &lt; 01.07.2018
IPS_SetEventConditionDateRule(12345, 0, 2, 4, 1, 7, 2018);
 
// Delete the rule with ID 1
IPS_SetEventConditionDateRule(12345, 0, 1, 0, -1, 0, 0);
Deutsche Webseite verfügbar
Go to cart
Any questions?