{"id":47,"date":"2009-04-20T15:45:19","date_gmt":"2009-04-20T05:45:19","guid":{"rendered":"http:\/\/supportingelement.wordpress.com\/2009\/04\/20\/preventing-a-formula-from-being-processed-in-retro-calculations\/"},"modified":"2009-04-20T15:45:19","modified_gmt":"2009-04-20T05:45:19","slug":"preventing-a-formula-from-being-processed-in-retro-calculations","status":"publish","type":"post","link":"https:\/\/supportingelement.com\/index.php\/2009\/04\/20\/preventing-a-formula-from-being-processed-in-retro-calculations\/","title":{"rendered":"Preventing a formula from being processed in retro calculations"},"content":{"rendered":"<p>It is often necessary to change the behaviour of a formula depending on wether it is being called from the current calendar or a retro calendar. This tip shows you a simple method for determining if a formula is being processed in the current calendar. <\/p>\n<p>The \u201cCURR PRD CAL ID\u201d System Element returns the Calendar ID of the current period to be processed.<\/p>\n<p>The \u201cCAL ID\u201d System Element returns the calendar ID from the calendar currently being processed<\/p>\n<p>By comparing the \u201cCURR PRD CAL ID\u201d and  \u201cCAL ID\u201d we can check if a formula is being processed in the current Calendar\/Period, as apposed to a retro Calendar\/Period.  If the \u201cCURR PRD CAL ID\u201d and  \u201cCAL ID\u201d are equal, the formula is being processed in the current Calendar.<\/p>\n<p>The following formula excerpt shows this logic in an If construct:<\/p>\n<p>IF SY[CURR PRD CAL ID] = SY[CAL ID]  THEN<br \/>\n\tProcess in current period only<br \/>\nELSE<br \/>\n\tProcess in retro periods only<br \/>\nENDIF<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is often necessary to change the behaviour of a formula depending on wether it is being called from the current calendar or a retro calendar. This tip shows you a simple method for determining if a formula is being processed in the current calendar. The \u201cCURR PRD CAL ID\u201d System Element returns the Calendar\u2026 <span class=\"read-more\"><a href=\"https:\/\/supportingelement.com\/index.php\/2009\/04\/20\/preventing-a-formula-from-being-processed-in-retro-calculations\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,1],"tags":[26,29,31,34],"class_list":["post-47","post","type-post","status-publish","format-standard","hentry","category-all-posts","category-uncategorized","tag-global-payroll","tag-peoplesoft","tag-retro-processing","tag-system-elements"],"_links":{"self":[{"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/comments?post=47"}],"version-history":[{"count":0,"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/posts\/47\/revisions"}],"wp:attachment":[{"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/media?parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/categories?post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/supportingelement.com\/index.php\/wp-json\/wp\/v2\/tags?post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}