Hi,
I require a nintex inline function to match the below SharePoint calculation if anyone can help:
=CONCATENATE("LNA",YEAR(Modified),"-",LEFT("000000",6-(LEN(TEXT(NextNumber,"0")))),TEXT(NextNumber,"0"))
My intention is to create a unique auto incrementing column to use within SharePoint and InfoPath using nintex workflow to update my SharePoint list with the desired formatted number (LNA2014-000001). I have a SharePoint list with a "single line of text" column called "NextNumber" and a "calculated" column called "FollowingNumber" containing the calculation: =NextNumber+1
Explaination of the above calculation:
The TEXT(NextNumber,"0")
, which is used
twice is used to get the value of the NextNumber column of
the list item. The “0″ is the format parameter of the TEXT output – in
this case, an integer. From the beginning, a string value of “LNA” is set, to which we append the value of the YEAR the
list item was modified, followed by a dash. Then comes the tricky part, we want the number value to be padded with zeroes so that the number
is X characters long (in this case I have set the length to 6). LEFT()
gets the leftmost characters of the first argument (“000000″). The
number of characters is the second argument,
6-(LEN(TEXT(NextNumber,”0″))). This argument starts with the total
length we are going for, and reduces it by the length (LEN) of the TEXT
string.
So, for example, if the TEXT strings where 1 and 53, the LEN values are 1 and 2. Subtracted from 6, this leaves 5 and 4. The LEFT() function returns “00000″ and “0000″ respectively. This string is then appended to the “LNA2014-” string, followed by the number (1 or 53).
An InfoPath form will have data connections created to pull through the next number from the SharePoint list. Once the InfoPath form has been submitted to a SharePoint Form library the nintex workflow will then hopefully set the correct formatted title (LNA2014-000001) for the form and update the next number in the SharePoint list for the next form instance. I believe nintex variables can bet set to pull through sharepoint list column values if need be, where these can then be utilised in the nintex string builder action to set the correct format for the form title using inline functions. How can I create the above calculation using the nintex inline function syntax? Is my concept even achievable using nintex workflow 2010?
Thanks.