Supported Operators Operators are a set of commands that are used when working with PipeLanguage. With them you can perform mathematical, logical and other operations with system data. false W3sidGl0bGUiOiJBdXRvbWF0aW9uIiwidXJsIjoiL2RldmVsb3BlcnMvYXV0b21hdGlvbi8ifSx7InRpdGxlIjoiUGlwZUxhbmciLCJ1cmwiOiIvZGV2ZWxvcGVycy9hdXRvbWF0aW9uL3BpcGUtbGFuZy8ifSx7InRpdGxlIjoiRXhwcmVzc2lvbiBsYW5ndWFnZSIsInVybCI6Ii9kZXZlbG9wZXJzL2F1dG9tYXRpb24vcGlwZS1sYW5nL2V4cHJlc3Npb25sYW5ndWFnZS8ifV0= Automation /developers/automation/ ["developers","Automation"] ["developers","Automation","PipeLang"] developers

Supported Operators

Operators are a set of commands that are used when working with PipeLanguage. With them you can perform mathematical, logical and other operations with system data.

Arithmetic operators

& nbsp; & nbsp; & nbsp; + addition & nbsp; & nbsp; & nbsp; - subtraction & nbsp; & nbsp; & nbsp; * multiplication & nbsp; & nbsp; & nbsp; / division & nbsp; & nbsp; & nbsp; % modulo division & nbsp; & nbsp; & nbsp; ** exponentiation & nbsp; & nbsp; & nbsp; ~ string concatenation

order.totalSumm * 0.01 # 1% of the order amount
order.summ + order.deliveryCost # sum of products + delivery cost
order.id~'API' # 12345API

Comparison operators

== (==) equals === (===) identical (equal in value and type) != (! =) does not equal !== (! ==) is not identical < less > greater <= less than or equal >= greater than or equal matches matches regular expression not matches does not match regular expression

Note

Note that in regular expressions / is a special character and must always be escaped. For example, /d should be written as //d
order.status.groupCode == "approval" # order status in the Coordination group
order.deliveryCost <= 500 # delivery cost of the order is less than or equal to 500
order.source.thisName matches "/yandex/" # the order with "yandex" in the source
order.customerComment not matches "/test/" # operator comment does not contain the word "test"

Boolean operators

not negation and boolean and or boolean or

order.quantity < 2 and not changeSet.hasChangedField ("status") # the total number of products in the order is less than 2 and the order status has not changed
changeSet.hasChangedField ("delivery_cost") or changeSet.hasChangedField ("delivery_net_cost") # the cost or the prime cost of the delivery has changed

Operators for working wirh arrays

in is in the array not in is not in the array

changeSet.hasChangedField("status") and changeSet.newValue("status").groupCode in ["complete", "cancel"] 
# order status changed to status from the Completed or Canceled groups
changeSet.hasChangedField ("delivery_type") and changeSet.newValue ("delivery_type"). code not in ["russian-post", "sdek"] # delivery type changed to any, except Russian post or SDEK
Thank you for your feedback.
Was this article helpful?
No
  • The recommendations did not help
  • There is no answer to my question
  • The text is difficult to understand
  • I do not like the described functionality
Yes
Next article
Available functions
Main and auxiliary functions available when working with system objects.