Expand my Community achievements bar.

Calculation Field coming into 2020

Avatar

Level 1
We have a calculation field which includes the current year for projects. As this is our first year with Workfront, we do not know how the calculation will react once January 1st comes. We want to keep the 19 date for Complete/Closed projects, and only update the date for open/new ones. Would someone be able to help with a few questions? CONCAT(RIGHT(YEAR($$TODAY),2),"W",Reference Number) 1. Will the field update automatically on Jan 1st without the custom form being edited? 2. Will we need to do anything specific to make sure old completed projects do not update? Thanks, Jon W.
4 Replies

Avatar

Community Advisor
Hi Jon, The fields won't update automatically, but there are external events that could potentially cause a recalculation. In situations where I want a "stamped" calculation that will not change or update if/when the form is re-calculated, I take this approach: Assuming your field name for the calculation is something like "Internal Reference Number" IF(ISBLANK(Internal Reference Number,(CONCAT(RIGHT(YEAR($$TODAY),2),"W",Reference Number)),Internal Reference Number)) During a calculation event, if no value has previously been recorded to Internal Reference Number, it will perform the calculation with the current year. If a value has already been recorded to the custom field, it will replace it with whatever value was already recorded (stamp the same value on top of itself). Updating the calculation should not impact any recorded values; but it's always smart to test these out in your Preview environment first as a matter of safety and caution. William English T-Mobile
If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/4rbpr7hf

Avatar

Level 1
Interesting, thanks for the advice William! Jon Williams Medline Industries, Inc.

Avatar

Level 10
@William English provided a perfect example of how you can keep a calculated value from changing once something has been stored, which is a really important skill to have when it comes to forms. I hesitated to answer this question initially because something about the design of the calculation bothered me. If you don't want the date to ever change, you could use the year of the project's entry date instead of the $$TODAY. Either that, or you could add a custom field to the form to capture the year from a drop menu. In either case, this would mean the year would remain stable. Good luck with your solution! Narayan

Avatar

Community Advisor
That is a smarter approach, Narayan! Save the stamping strategy for calculations where a static date isn't available to reference. William English T-Mobile
If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/4rbpr7hf