{"id":23106,"date":"2018-01-02T12:52:26","date_gmt":"2018-01-02T04:52:26","guid":{"rendered":"http:\/\/localhost\/help\/?page_id=23106"},"modified":"2024-07-04T13:36:52","modified_gmt":"2024-07-04T05:36:52","slug":"using-the-calculation-editor","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/configuring-your-system\/creating-a-calculation\/using-the-calculation-editor\/","title":{"rendered":"Using the Calculation Editor"},"content":{"rendered":"\n<h2 class=\"page-subheading\">Quick Start<\/h2>\n<p class=\"intro-text\">1. Build your calculation expression by <strong>dragging and dropping<\/strong> a function into the edit box. You can also drag entities, templates, tags, and other calculations in - click the relevant tab to see the available items. Note you do not need to drag and drop - you can simply type in the edit box if you wish.<\/p>\n<p class=\"left-bar\">Related: <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/configuring-your-system\/creating-a-calculation\/using-the-calculation-editor\/features-of-the-edit-box\/\">Features of the Edit Box<\/a><\/p>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\">2. In the <strong>edit box<\/strong>, make the changes you need to validate your expression. <br \/>\nWhen a function is dragged into the edit box, the parameters inside the brackets are simply placeholders, and you will need to modify them with the correct parameters for the function to work. The square brackets [ ] indicate optional parameters.\u00a0<\/p>\n<p class=\"left-bar\">Related: <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/calculation-syntax\/\">Calculation Overview and Syntax<\/a>, <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/keywords\/\">Keywords<\/a>, <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/operators\/\">Operators<\/a>\u00a0<\/p>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\">3. Check the provided examples in the <strong>Details<\/strong> help tab to make sure you are on the right track.\u00a0<\/p>\n<p class=\"intro-text\">4. Ensure the <strong>Errors<\/strong> tab displays 0 errors - this is how you know your function has the correct syntax.<\/p>\n<p class=\"intro-text\">5. Click the <strong>Test<\/strong> tab to use the <strong>Calculation Tester<\/strong>, so you can\u00a0check that your calculation returns the correct data.<\/p>\n<p class=\"left-bar\">Related: <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/configuring-your-system\/creating-a-calculation\/using-the-calculation-tester\/\">Using the Calculation Tester<\/a><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/02\/calc-editor-quick.png\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24483\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/02\/calc-editor-quick.png\" alt=\"\" width=\"1176\" height=\"714\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/02\/calc-editor-quick.png 1176w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/02\/calc-editor-quick-768x466.png 768w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/02\/calc-editor-quick-150x91.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/02\/calc-editor-quick-24x15.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/02\/calc-editor-quick-36x22.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/02\/calc-editor-quick-48x29.png 48w\" sizes=\"auto, (max-width: 1176px) 100vw, 1176px\" \/><\/a><\/p>\n<p class=\"note\">Note: The Calculation Editor has been designed to support a minimum width of 1024px.<\/p>\n<p>&nbsp;<\/p>\n<h2 class=\"page-subheading\">Calculation Editor Dialog Box<\/h2>\n<p class=\"intro-text\">In the example below, the Calculation Editor is opened from an Explorer Trend. When the Calculation Editor is opened from Explorer, it is opened in a dialog box with additional features and options:<\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2018\/01\/calc-editor-dialog-box1.png\" rel=\"lightbox-1\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-34749 size-full\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2018\/01\/calc-editor-dialog-box1.png\" alt=\"\" width=\"1467\" height=\"779\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2018\/01\/calc-editor-dialog-box1.png 1467w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2018\/01\/calc-editor-dialog-box1-768x408.png 768w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2018\/01\/calc-editor-dialog-box1-150x80.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2018\/01\/calc-editor-dialog-box1-1280x680.png 1280w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2018\/01\/calc-editor-dialog-box1-24x13.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2018\/01\/calc-editor-dialog-box1-36x19.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2018\/01\/calc-editor-dialog-box1-48x25.png 48w\" sizes=\"auto, (max-width: 1467px) 100vw, 1467px\" \/><\/a><\/p>\n<p class=\"intro-text\">At the top of the dialog box, the name and description will be shown (if applicable), and at the bottom are the available options for saving. They may be a combination of the following:<\/p>\n<p class=\"intro-text\"><strong>Save<\/strong>: Save changes to the existing calculation. Available only when the calculation is being edited, does not apply to new calculations.\u00a0<\/p>\n<p class=\"intro-text\"><strong>Save As<\/strong>: Save the calculation expression as a new calculation with a Name and Description. The name cannot contain <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/reserved-characters-keywords\/\">reserved characters<\/a>. The calculation is inserted into the trend, with its name appearing in the trace table, rather than its expression.\u00a0This functionality requires <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/security\/application-and-global-roles\/\">Tag Editor permissions<\/a> in IFS OI Security.\u00a0<\/p>\n<p class=\"intro-text\"><strong>Finish<\/strong>: Close the calculation editor and insert the new calculation into the trend. Only available when creating a new calculation in a trend.<\/p>\n<p class=\"intro-text\"><strong>Cancel<\/strong>: Exit the calculation editor. The calculation is not saved or inserted into the trend.<\/p>\n<h3>Cancelling Unsaved Changes<\/h3>\n<p class=\"intro-text\">If you cancel the calculation editor, and there are unsaved changes, a confirmation dialog appears.\u00a0<\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/09\/image013.png\" rel=\"lightbox-2\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-31544\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/09\/image013.png\" alt=\"\" width=\"358\" height=\"195\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/09\/image013.png 358w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/09\/image013-150x82.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/09\/image013-24x13.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/09\/image013-36x20.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/09\/image013-48x26.png 48w\" sizes=\"auto, (max-width: 358px) 100vw, 358px\" \/><\/a><\/p>\n<p class=\"intro-text\"><strong>Save<\/strong>: Save your changes to the calculation.<br \/>\n<strong>Discard<\/strong>: Abandon your changes to the calculation.<br \/>\n<strong>Cancel<\/strong>: Return to the calculation editor, which still has your unsaved changes.<\/p>\n<h3>Example<\/h3>\n<p class=\"intro-text\">In the following example, we search for an entity from the entity list, then choose an attribute value to add to the expression. We multiply the attribute value by 2.<\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Using-the-calc-editor.png\" rel=\"lightbox-3\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-29770\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Using-the-calc-editor.png\" alt=\"\" width=\"1000\" height=\"599\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Using-the-calc-editor.png 1283w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Using-the-calc-editor-768x460.png 768w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Using-the-calc-editor-150x90.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Using-the-calc-editor-1280x766.png 1280w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Using-the-calc-editor-24x14.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Using-the-calc-editor-36x22.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Using-the-calc-editor-48x29.png 48w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><\/p>\n<p class=\"intro-text\">In the <strong>Calculation Editor<\/strong>:<\/p>\n<p class=\"intro-text\"><strong>1. <\/strong> Click the <em>Entities<\/em> tab. Available component groups are: <img loading=\"lazy\" decoding=\"async\" class=\"wp-image-29769 size-full alignnone\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Function-tab.png\" alt=\"\" width=\"25\" height=\"25\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Function-tab.png 25w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Function-tab-24x24.png 24w\" sizes=\"auto, (max-width: 25px) 100vw, 25px\" \/><em>Functions and Keywords, <img loading=\"lazy\" decoding=\"async\" class=\"wp-image-29768 size-full alignnone\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Entities-tab.png\" alt=\"\" width=\"25\" height=\"25\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Entities-tab.png 25w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Entities-tab-24x24.png 24w\" sizes=\"auto, (max-width: 25px) 100vw, 25px\" \/> Entities, <img loading=\"lazy\" decoding=\"async\" class=\"wp-image-29767 size-full alignnone\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Templates-tab.png\" alt=\"\" width=\"25\" height=\"25\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Templates-tab.png 25w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Templates-tab-24x24.png 24w\" sizes=\"auto, (max-width: 25px) 100vw, 25px\" \/> Templates, <\/em> <img loading=\"lazy\" decoding=\"async\" class=\"wp-image-29766 size-full alignnone\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Tags-tab.png\" alt=\"\" width=\"25\" height=\"25\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Tags-tab.png 25w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Tags-tab-24x24.png 24w\" sizes=\"auto, (max-width: 25px) 100vw, 25px\" \/> <em>Tags<\/em> and <img loading=\"lazy\" decoding=\"async\" class=\"wp-image-29765 size-full alignnone\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Calc-Tab.png\" alt=\"\" width=\"25\" height=\"25\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Calc-Tab.png 25w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/08\/Calc-Tab-24x24.png 24w\" sizes=\"auto, (max-width: 25px) 100vw, 25px\" \/> <em>Calculations<\/em>.<\/p>\n<p class=\"intro-text\"><strong>2. <\/strong> Type search text (<em>TWell 1<\/em>) in the Search box. (You can use <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-getting-started\/search-page\/#Searching_with_Wildcard_Filtering\">wildcard filtering<\/a> here.)<\/p>\n<p class=\"intro-text\"><strong>3. <\/strong>Click an entity in the filtered list (<em>TWell 1<\/em>). The entity's templates are listed in the <strong>Templates<\/strong> column in the <strong>Details<\/strong> tab.<\/p>\n<p class=\"intro-text\"><strong>4. <\/strong>Click a template to select it (<em>Oil Producing Well<\/em>). The template's attributes are listed in the <strong>Attributes<\/strong> column in the <strong>Details<\/strong> tab.<\/p>\n<p class=\"intro-text\"><strong>5. <\/strong>Click an attribute to select it (<em>Alloc Oil<\/em>). The attribute's values are listed in the <strong>Values<\/strong> column in the <strong>Details<\/strong> tab.<\/p>\n<p class=\"intro-text\"><strong>6. <\/strong>Double-click the attribute value that you want to use (<em>Actual<\/em>). This inserts the fully-qualified attribute value into the expression editor.<\/p>\n<p class=\"intro-text\"><strong>7. <\/strong>Complete the calculation expression: type <strong>* 2<\/strong> after the fully-qualified attribute value, to multiply by 2.<\/p>\n<p class=\"intro-text\"><strong>8. <\/strong>Click <strong>Save As<\/strong> or\u00a0<strong>Finish<\/strong>, as required.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Click the markers through this interactive tour to learn about the calculation editor's features, and read the Quick Start to quickly learn how to use it.<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/configuring-your-system\/creating-a-calculation\/using-the-calculation-editor\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":23157,"parent":23105,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[4],"tags":[100],"class_list":["post-23106","page","type-page","status-publish","has-post-thumbnail","hentry","category-explainer","tag-calculations","Version-4-5-4","Product-srv"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/23106","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=23106"}],"version-history":[{"count":4,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/23106\/revisions"}],"predecessor-version":[{"id":67761,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/23106\/revisions\/67761"}],"up":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/23105"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media\/23157"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=23106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=23106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=23106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}