For example if i have a company name: Aeronautical Machine Transportation and Repair Company PVT. LTD.
From above example i would like to get only first 15 letters in all capital letters including space "AERONAUTICAL MACH" or i am not sure if space is also counted as a letter?
Solved! Go to Solution.
Are you using Nintex Forms in your solution? Is the company name being there provided by a user, using a form? If so, you could use inline functions in Nintex Form, to dynamically calculate the information you need, using the PadLeft and ToUpper functions: http://help.nintex.com/en-US/o365/#o365/O365Forms/ReferenceOther/Inlinefunctionsprovided.htm then to save the outcome in another field of your choice.
On the other hand, if you don't use Forms, Nintex Workflow for O365 doesn't have inline functions yet To get the first 15 characters out of your string you should then create an integer variable having its default value = 0, a loop with a condition to run until the variable is equal or greater 15, then in each run get the substring from a string starting on position indicated by the variable and having length = 1. The append such extracted character to a string variable of your choice. This approach will let you to get first 15 characters, however won't capitalize them. I have no better idea for capitalization better than having a replace action replacing each lowercase letter with its uppercase counterpart.
My approach would be to use the inline function substring:
fn-ToUpper(fn-Substring(Your String,Index to start,number of characters))
fn-ToUpper(fn-Substring(Aeronautical Machine Transportation and Repair Company PVT. LTD,0,15))
which would give you
You would just need to change the number of characters to return to get your desired result
Hope this helps
What I meant in general is that your approach is not possible in Nintex Workflow for Office 365 because there are no inline functions So your solution is perfect, but not for the Office 365
Thank you Tomasz for your reply,
While creating a question i did not see an option to categorize this question as a SharePoint on prem, and we do have an on prem environment.
The solution provided by Paul worked perfectly, and i am pretty sure we could use various methods and the method provided by you will work as well.
Thank you Paul,
Your solution hit the nail in the head. I was trying to do a SQL insert and the column (sort name) that came from name has max 15 varchar length.