This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Im trying to make a new custom record field, so that it looks this A01, A02, A03 and so on. Currently the Record ID tool is only displaying without me being able to make any changes to it.
Any idea how?
Go to Solution.
Go to Solution.
Use the recordID to generate your numbers, then you can use a formula tool to add the letter prefix as you desired.
I suspect it's more complex than this mind.
So lets say the output field is [Customer ID]
and [Customer ID_t] is a temporary field generated by the Record_ID tool.
All fields are set to vstring.
I tried this:
if [Customer ID_t]<="9" ThenPadLeft([Customer ID_t], 0, "C0")elsePadLeft([Customer ID_t], 0, "c")Endif
But the output is still 1,2,3,4 in the Customer ID field.
It appears your pad statement is incorrect.The purpose of the PADLEFT function is too add the values in the 3rd part of the statement until the character length reaches that expressed by the 2nd part of the statement.
You don't really need the if statement, it should be something like...
Make sure you convert the customer ID_t field to a string beforehand.Alternatively if the padding needs to be more dynamic based on the number of ID's you can try the approach in the example attached.This should also help you come to the solution.Ben
Thanks a lot, I realised that the if else statement was needless. Thanks.
Also that my padleft statement was wrong.
It works now.
Thank You :)