Supported Rules for SRT

This section will discuss the rules available in SRT configuration that allow you to execute recurring operations or actions in a randomized order.

Only

The "only" rule signifies that an action will solely be repeated during the specified cycle.

{
   "rules":{
      "only":2
   }
}

Every

The "every" rule necessitates an additional parameter called "start," which is a numeric value indicating the cycle from which the section should commence. If the "start" rule is omitted, it defaults to 1, and the section will subsequently repeat in every designated cycle.

{
   "rules":{
      "every":3
   }
}

Start

The "start" rule determines the cycle in which the data will initially appear.

{
   "rules":{
      "start":4
   }
}

End

The "end" rule determines the cycle at which the data will cease to repeat. For example, specifying "4," as in the example below, means that the variables will be visible for 4 cycles and will not repeat thereafter.

{
   "rules":{
      "end":4
   }
}

Even cycles

Utilize this rule exclusively for even cycles.

{
   "rules":{
      "row":"even"
   }
}

Odd cycles

Utilize this rule specifically for odd cycles.

{
   "rules":{
      "row":"odd"
   }
}

The "hasValue" rule

You can employ the "hasValue" rule to utilize data from a particular field.

{
   "rules":{
      "hasValues":[
         "p_old_price"
      ]
   }
}

The "hasConditionalValues" rule

The "hasConditionalValues" rule identifies and displays values for specific fields. This rule operates only if the value of the designated field is not empty.

{
   "rules":{
      "hasConditionalValues":[
         {
            "key":"p_old_price",
            "skipEmptyValues":true
         }
      ]
   }
}

In this scenario, the same rule will solely locate and display the exact value from the specified field.

{
   "rules":{
      "hasConditionalValues":[
         {
            "key":"p_old_price",
            "value":"123"
         }
      ]
   }
}

Records

The "records" rule can be utilized when there are X number of records remaining in the data array.

{
   "rules":{
      "records":2
   }
}

Even

The "even" rule is only applicable when there is an equal number of records in total.

{
   "rules":{
      "totalRecords":"even"
   }
}

Odd

You can employ this rule exclusively when the total number of records is odd.

{
   "rules":{
      "totalRecords":"odd"
   }
}