AnsweredAssumed Answered

how can I change a code with script?

Question asked by grabo on Sep 22, 2017
Latest reply on Sep 23, 2017 by DavidJondreau

I have a code in this code / number / number. The code can be 7/8 characters (variable alphanumeric), the first number is 2 digits (the last two digits of the year) and the last one is a number. Then XXXXXX12/17/1. I should make a script that allows me to change the two digits of the year between "/" and "/". How do I locate that script script? My difficulty is that I do not know how many characters are in the preceding code if I am 6/7 or 8 ... but I fixed the final numbers are always 3: two numbers, "/" and a number. I should only change "17" with "18" then in a year "19" .... (etc)


I would need to define this in a calculated field for a script.


Then through the calculated field functions I have to find the way to change the code then assign it to "Set field"