{"id":9513,"date":"2016-02-18T16:21:20","date_gmt":"2016-02-18T08:21:20","guid":{"rendered":"http:\/\/localhost\/help\/?page_id=9513"},"modified":"2025-11-05T23:47:02","modified_gmt":"2025-11-05T15:47:02","slug":"operators","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/operators\/","title":{"rendered":"Operators"},"content":{"rendered":"<p class=\"intro-text\">When a function accepts a value of list of values as an input, you can use operators on the values, within the function. E.g. <span class=\"code-fragment\">Tag1 - Tag2<\/span>.<\/p>\n<table class=\"toc-table\" style=\"height: 474px;\" width=\"963\">\n<tbody>\n<tr>\n<td style=\"width: 496px;\"><strong>Operator<\/strong><\/td>\n<td style=\"width: 785px;\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>+<\/strong><\/td>\n<td style=\"width: 785px;\">Addition.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>-<\/strong><\/td>\n<td style=\"width: 785px;\">Subtraction.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>*<\/strong><\/td>\n<td style=\"width: 785px;\">Multiplication.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>\/<\/strong><\/td>\n<td style=\"width: 785px;\">Division.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>%<\/strong><\/td>\n<td style=\"width: 785px;\">Modulus.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>**<\/strong><\/td>\n<td style=\"width: 785px;\">Exponent or Power.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>&amp;&amp;<\/strong><\/td>\n<td style=\"width: 785px;\">Logical AND.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>||<\/strong><\/td>\n<td style=\"width: 785px;\">Logical OR.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>&amp;<\/strong><\/td>\n<td style=\"width: 785px;\">Bitwise or Binary AND.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>|<\/strong><\/td>\n<td style=\"width: 785px;\">Bitwise or Binary OR.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>^<\/strong><\/td>\n<td style=\"width: 785px;\">Bitwise or Binary XOR<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>==<\/strong><\/td>\n<td style=\"width: 785px;\">Equals comparison.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>!=<\/strong><\/td>\n<td style=\"width: 785px;\">Not Equal comparison.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>&lt;<\/strong><\/td>\n<td style=\"width: 785px;\">Less Than comparison.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>&lt;=<\/strong><\/td>\n<td style=\"width: 785px;\">Less Than or Equal comparison.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>&gt;<\/strong><\/td>\n<td style=\"width: 785px;\">Greater Than comparison.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>&gt;=<\/strong><\/td>\n<td style=\"width: 785px;\">Greater Than or Equal comparison<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 496px;\"><strong>!<\/strong><\/td>\n<td style=\"width: 785px;\">Not comparison.\u00a0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"intro-text\">The image below shows a matrix of the operators available, and how they resolve when they are used with various data types.<\/p>\n<p class=\"left-bar-p2blue\">Example: If you want to add 2 variables, one with a Boolean data type and one with a Duration data type, the result will have a Duration data type. You can see this by examining the Addition table in the top left corner below.<\/p>\n<p class=\"intro-text\">Operator precedence follows the standard mathematical rules. Brackets ( ) can be used to specify precedence explicitly. E.g.\u00a0<strong>2 * (3 + 4)<\/strong>.<\/p>\n<div class=\"best-prac\">\n<p class=\"best-prac-desc\"><i class=\"fa fa-download fa-2x fa-pull-left\"><\/i> \u00a0\u00a0<a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2025\/11\/Operator-Return-Types.pdf\">Download the printable PDF!<\/a><\/p>\n<\/div>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/printables\/P2%20Server%20Operator%20Return%20Types.pdf\" rel=\"attachment wp-att-9530\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-12832 size-full\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/02\/returntypes.png\" width=\"1151\" height=\"1445\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/02\/returntypes.png 1151w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/02\/returntypes-768x964.png 768w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/02\/returntypes-119x150.png 119w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/02\/returntypes-19x24.png 19w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/02\/returntypes-29x36.png 29w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/02\/returntypes-38x48.png 38w\" sizes=\"auto, (max-width: 1151px) 100vw, 1151px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Operator precedence follows the standard mathematical rules. Brackets ( ) can be used to specify precedence explicitly. E.g. 2 * (3 + 4). This page describes the mathematical and logical operators available for use in expressions parsed by the Server calculation engine.<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/operators\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":9514,"parent":3650,"menu_order":6,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[9],"tags":[1197,14,100,1196,1195,1198,357],"class_list":["post-9513","page","type-page","status-publish","has-post-thumbnail","hentry","category-tech-ref","tag-bitwise","tag-breadcrumb","tag-calculations","tag-logical","tag-modulus","tag-not","tag-operators","Product-srv"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/9513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/comments?post=9513"}],"version-history":[{"count":3,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/9513\/revisions"}],"predecessor-version":[{"id":71369,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/9513\/revisions\/71369"}],"up":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/3650"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media\/9514"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=9513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=9513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=9513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}