Hi All,
I am using Nintex Form + Nintex Workflow on SharePoint Online, and I have a very simple requirement.
I would like to build a string for the custom FormID by using Nintex Workflow, with this format: ABC-2019-00001
The "ABC" part is fixed prefix;
The "2019" part is current year;
The "00001" is the sequency number, which retrieve from another SharePoint list (counter list), and it should pad left with total 5 digit, and finally, update the counter list.
And the "-" is a fixed string as the sperator.
My current state as below:
1. Get current time: no problem, I create a "DateTime" variable, and set it "Use date when action is executed"
year by using "fn-FormatDate()" / "formatDate()" (I am not sure what are the different on this).
2. Get current year: retrieve the year part from the Current time variable, I tried following formula but invain, it either return empty string or the raw text of the formula:
fn-FormatDate({TextStart}{Variable:CurrentTime}{TextEnd},"YYYY")
fn-FormatDate({Variable:CurrentTime},"YYYY")
3. Pad Left for ID: I get the lastID from the list and assigned to an "number" variable, and use Calculate function to plus 1. And I would like to pad left with 5 digit, same result of format date:
fn-PadLeft({Variable:FormID}, 5, 0)
Any suggestion?
Thanks,
Lam