{"id":5632,"date":"2013-07-15T09:20:37","date_gmt":"2013-07-15T14:20:37","guid":{"rendered":"http:\/\/www.mrc-productivity.com\/legacy\/?page_id=5632"},"modified":"2017-06-12T12:05:07","modified_gmt":"2017-06-12T17:05:07","slug":"calculations","status":"publish","type":"page","link":"https:\/\/www.mrc-productivity.com\/legacy\/m-power-build-process\/calculations","title":{"rendered":"Calculations"},"content":{"rendered":"<h1>Calculations<\/h1>\n<p>The Calculations specification is an important tool in designing applications, allowing you to create new fields to work with in subsequent calculations, record selections, and external objects.  Through calculations, you can create numeric and character expressions, call database functions, and perform conditional logic.<\/p>\n<p><a href=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/calculations1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"436\" class=\"alignnone  wp-image-5633\" alt=\"calculations\" src=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/calculations1.png\" srcset=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/calculations1.png 800w, https:\/\/www.mrc-productivity.com\/legacy\/images\/calculations1-150x81.png 150w, https:\/\/www.mrc-productivity.com\/legacy\/images\/calculations1-300x163.png 300w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<h3>Input Fields:<\/h3>\n<p>Field Name- When creating new fields in summaries, you need to specify a field name.  This name will be the name of the field in the database.<\/p>\n<p>Calc Type- Select your calculation type from the dropdown:\u00a0 database, system value, parameter, application, or external object.  Database calculations are the most common calculation type, and will meet the needs of most new m-Power developers.  For more information on calculation types, click <a href=\"https:\/\/www.mrc-productivity.com\/legacy\/calcs\/m-power-calculation-screen#calcTypes\">here<\/a>.<\/p>\n<p>Description- Enter a description of the field that will appear in your application.<\/p>\n<p>Data Type- Select either numeric, alpha, or date.<\/p>\n<p>Length- Specify the length of your field.\u00a0 Remember that the calculation may change the expected field length, and in some instances it is a good idea to have a small buffer.\u00a0 <strong>Note:\u00a0 <\/strong>the length includes the length of the decimal, and extra digits will automatically be trimmed.\u00a0 For instance, 45.342 will have a length of 5, and a decimal of three.<\/p>\n<p>Format- Select the desired format.\u00a0 m-Power comes equipped with commonly used numeric and date formats.  However, you can also <a href=\"https:\/\/www.mrc-productivity.com\/legacy\/general\/datetime-formatting\">design your own formats<\/a>.<\/p>\n<p>Round- If set to yes, the decimal\u00a0 portion of the value will round up if the decimal is greater than or equal to .5 , otherwise the value will round down.\u00a0 If rounding is set to no, the decimal will truncate depending on the specified length.<\/p>\n<p>Calculation- Input your calculation in the largest input box.\u00a0 You may type in your calculation or use the calculator provided.\u00a0 The fields and functions available to use will depend on the calculation type.<\/p>\n<h3>Conditions<\/h3>\n<p>m-Power is equipped to add conditions to calculations. Data that matches the requirements of the condition will process the calculation. To add a condition, click Add New. This opens the Conditions box.<\/p>\n<p><a href=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/calculations_conditions2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"271\" class=\"alignnone  wp-image-5635\" alt=\"calculations_conditions2\" src=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/calculations_conditions2.png\" srcset=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/calculations_conditions2.png 800w, https:\/\/www.mrc-productivity.com\/legacy\/images\/calculations_conditions2-150x50.png 150w, https:\/\/www.mrc-productivity.com\/legacy\/images\/calculations_conditions2-300x101.png 300w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>Select the desired field and relationship from the respective drop down lists, and enter a value.\u00a0 Finally, select either &quot;And&quot; or &quot;Or&quot; from the final drop down.\u00a0 Selecting &quot;And&quot; will require the subsequent condition to also meet the required relationship for the calculation.\u00a0 Selecting &quot;Or&quot; will allow the calculation to process if either of the conditions are met.<\/p>\n<p>For more information on calculations, please click <a href=\"https:\/\/www.mrc-productivity.com\/legacy\/calcs\/m-power-calculation-screen\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Calculations The Calculations specification is an important tool in designing applications, allowing you to create new fields to work with in subsequent calculations, record selections, and external objects. Through calculations, you can create numeric and character expressions, call database functions, and perform conditional logic. Input Fields: Field Name- When creating new fields in summaries, you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":5340,"menu_order":11,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5632","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/5632","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/comments?post=5632"}],"version-history":[{"count":20,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/5632\/revisions"}],"predecessor-version":[{"id":6957,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/5632\/revisions\/6957"}],"up":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/5340"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/media?parent=5632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}