If
Command description
Evaluate one or more conditions. If the result is true, the indented child commands run; otherwise, execution continues with the next sibling command. You may select variables from the list or enter Python expressions.
Command Input Parameters
| input parameters | Input parameter type | Description |
|---|---|---|
| l1 | PythonExpression | Any Python expression, Python literal, etc. |
| r1 | PythonExpression | Any Python expression, Python literal, etc. |
| c1 | enum | Optional values are Equals, Does Not Equal, Greater Than, Less Than or Equal To, Less Than, Greater Than or Equal To, Contains, Does Not Contain, Starts With, Does Not Start With, Ends With, Does Not End With, Length Equals, Length Does Not Equal, Length Greater Than, Length Less Than |
| condition | enum | How multiple condition groups are combined: All Conditions or Any Condition |
Parameter group rules:
- You can configure any number of sets of conditional parameters. The parameter names must be in ascending order:
l1/r1/c1,l2/r2/c2,l3/r3/c3... - Each group must contain the three parameters
lN,rNandcNat the same time, no missing items are allowed. - The serial number must start from 1 and increase continuously, do not skip numbers.
- Include
conditiononly once to specify how all parameter groups are combined.
Command Output Parameters
None
Example 1
{
"ins": "If",
"in": {
"l1": "webPage.url",
"r1": "'runavelo.com'",
"c1": "'Equals'",
"l2": "webPage.title",
"r2": "''",
"c2": "'Does Not Equal'",
"l3": "[1,2,3]",
"r3": "{'a':1,'b':2}",
"c3": "'Does Not Equal'",
"l4": "['1','2','3']",
"r4": "'2'",
"c4": "'Contains'",
"condition": "'All Conditions'"
}
}