{"id":609,"date":"2021-12-30T18:33:59","date_gmt":"2021-12-30T18:33:59","guid":{"rendered":"https:\/\/logicbuilder.integroscrm.com\/help\/?page_id=609"},"modified":"2022-08-04T18:20:11","modified_gmt":"2022-08-04T18:20:11","slug":"round","status":"publish","type":"page","link":"https:\/\/logicbuilder.integroscrm.com\/help\/round\/","title":{"rendered":"Round"},"content":{"rendered":"\n<p><a name=\"abstract\"><\/a>Rounds a numeric value to specified precision (number of digits after the decimal point).<\/p>\n\n\n\n<p><strong>inputs:<\/strong><\/p>\n\n\n\n<p><span style=\"color:#b197cb;\">value<\/span> &nbsp;&#8211; input numeric value to round,&nbsp;e.g.&nbsp;result of math operation&nbsp;or value from Sugar Fields with&nbsp;<a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/get-attribute-data\/\">Get Attribute Data<\/a>&nbsp;operator.&nbsp;To avoid ambiguity in numeric values which may vary based on user preferences please use output port <span style=\"color:#6888c9;\">value<\/span> from&nbsp;<span style=\"color:#ec8f45;\">Get Attribute<\/span>&nbsp;operator to perform any math operation using Sugar fields values.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Required: yes<\/li><\/ul>\n\n\n\n<p><span style=\"color:#b197cb;\">precision<\/span> &#8211; specify directly in the operator number of decimals to round to:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>If the precision is positive, a value is rounded to defined in precision significant digits after the decimal point.<\/li><li>If the precision is negative, a value is rounded to defined in precision significant digits before the decimal point (e.g. for a precision of -1 value is rounded to tens, for a precision of -2 to hundreds, etc.)<ul><li>Required: yes<\/li><\/ul><\/li><\/ul>\n\n\n\n<p><span style=\"color:#9ed267;\">round&nbsp;type<\/span> &#8211; select from the list the mode in which rounding occurs:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><em>Round Half Up<\/em>&nbsp;Rounds a value away from zero when it is half way there, making 1.5 into 2 and -1.5 into -2.<\/li><li><em>Round Half Down&nbsp;<\/em>Rounds a value towards zero when it is half way there, making 1.5 into 1 and -1.5 into -1.<\/li><li><em>Round Half Even<\/em>&nbsp;Rounds a value towards the nearest even value when it is half way there, making both 1.5 and 2.5 into 2.<\/li><li><em>Round Half Odd<\/em>&nbsp;Rounds a value towards the nearest odd value when it is half way there, making 1.5 into 1 and 2.5 into 3.<\/li><li><em>Round Up<\/em>&nbsp;Rounds a value away from zero, making 1.5 into 2<\/li><li><em>Round Down<\/em>&nbsp;Rounds a value towards zero, making 1.5 into 1<ul><li>Required: yes<\/li><\/ul><\/li><\/ul>\n\n\n\n<p><strong>outputs:<\/strong><\/p>\n\n\n\n<p>result &#8211; the value rounded to the given precision with the selected round type.&nbsp;Result may be used as an input for <span style=\"color:#ec8f45;\">Math<\/span> or <a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/set-entity-attributes\/\">Set Entity Attributes<\/a> operator.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2021\/12\/img-114-41ec57665fda44efa2520b6079312743-1024x335.png\" alt=\"\" class=\"wp-image-610\" width=\"850\" height=\"278\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2021\/12\/img-114-41ec57665fda44efa2520b6079312743-1024x335.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2021\/12\/img-114-41ec57665fda44efa2520b6079312743-300x98.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2021\/12\/img-114-41ec57665fda44efa2520b6079312743-768x251.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2021\/12\/img-114-41ec57665fda44efa2520b6079312743.png 1533w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/figure>\n<div style=\"text-align:left\" class=\"yasr-auto-insert-visitor\"><!--Yasr Visitor Votes Shortcode--><div id='yasr_visitor_votes_609' class='yasr-visitor-votes'><div class=\"yasr-custom-text-vv-before yasr-custom-text-vv-before-609\">Click to rate this post!<\/div><div id='yasr-vv-second-row-container-b996ca6f1270e' \n                                        class='yasr-vv-second-row-container'><div id='yasr-visitor-votes-rater-b996ca6f1270e'\n                                      class='yasr-rater-stars-vv'\n                                      data-rater-postid='609' \n                                      data-rating='0'\n                                      data-rater-starsize='24'\n                                      data-rater-readonly='false'\n                                      data-rater-nonce='fa81b01ba5' \n                                      data-issingular='false'\n                                    ><\/div><div class=\"yasr-vv-stats-text-container\" id=\"yasr-vv-stats-text-container-b996ca6f1270e\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" \n                               class=\"yasr-dashicons-visitor-stats\"\n                               data-postid=\"609\" \n                               id=\"yasr-stats-dashicon-b996ca6f1270e\">\n                            <path d=\"M18 18v-16h-4v16h4zM12 18v-11h-4v11h4zM6 18v-8h-4v8h4z\"><\/path>\n                          <\/svg><span id=\"yasr-vv-text-container-b996ca6f1270e\" class=\"yasr-vv-text-container\">[Total: <span id=\"yasr-vv-votes-number-container-b996ca6f1270e\">0<\/span>  Average: <span id=\"yasr-vv-average-container-b996ca6f1270e\">0<\/span>]<\/span><\/div><div id='yasr-vv-loader-b996ca6f1270e' class='yasr-vv-container-loader'><\/div><\/div><div id='yasr-vv-bottom-container-b996ca6f1270e' class='yasr-vv-bottom-container'><\/div><\/div><!--End Yasr Visitor Votes Shortcode--><\/div>","protected":false},"excerpt":{"rendered":"<p>Rounds a numeric value to specified precision (number of digits after the decimal point). inputs: value &nbsp;&#8211; input numeric value to round,&nbsp;e.g.&nbsp;result of math operation&nbsp;or value from Sugar Fields with&nbsp;Get Attribute Data&nbsp;operator.&nbsp;To avoid ambiguity in numeric values which may vary based on user preferences please use output port value from&nbsp;Get Attribute&nbsp;operator to perform any math &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/logicbuilder.integroscrm.com\/help\/round\/\"> <span class=\"screen-reader-text\">Round<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","footnotes":""},"tags":[],"class_list":["post-609","page","type-page","status-publish","hentry"],"yasr_visitor_votes":{"number_of_votes":0,"sum_votes":0,"stars_attributes":{"read_only":false,"span_bottom":false}},"_links":{"self":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/609","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/comments?post=609"}],"version-history":[{"count":3,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/609\/revisions"}],"predecessor-version":[{"id":2085,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/609\/revisions\/2085"}],"wp:attachment":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/media?parent=609"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/tags?post=609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}