0

I would like to set a custom reference number for documents in my site library.

The format for this reference is Currently IA17-0001. The IA is static, the 17 represents the year, and 0001 represents how many documents have been entered in relation to the year.

I created a List with an Record and Year Column to store which record I am on.

I'm not sure how to get it, but I need to set a Workflow variable to the current Year? I've figured how to set a variable to Today, but can't figure out how to get the Year from that value. Ideally the year would be the last two of the year - 17, not 2017.

When I get the Record column for the current year, there might not be a row. I plan on setting a workflow variable to the Current record for the year, if the number I get is 1, insert a row, if it's larger, I'll update the Item in the list.

After I'm not sure how to format a variable to the number with leading zeros.

If I'm not mistaken, having these two variables with my Year Part, and my Document Number with leading zeros, I should be able to Concatenate them in the String Builder.

My workflow Platform Type is a 2013 Workflow and my experience is still beginner.

0

What about an extra Calculated Coulmn that outputs:

="IA" & YEAR( [YearColumn] ) & "-" & TEXT( [RecordNr] , "0000" )
  • Wouldn't I need to create two extra columns to store Year and Record Number? I wouldn't need them after I used them to build the Reference Number, so I figured it would be better not to create them. – MrMatt Feb 17 '17 at 12:01
  • Instead of [YearColumn] you could use [Created] if that works for you, all depends on where the info comes from and where it is needed. Note that I renamed the ColumnNames in the example only for explanation purpose (and because YEAR is a Function) – Danny '365CSI' Engelman Feb 17 '17 at 12:31
  • Thanks, I ended up having to create the Year Calculated Column since I needed the value in the workflow. Calculation worked. – MrMatt Feb 17 '17 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.