Hi
I’m trying to create Unique Order numbers in my app. To do this I’m combining three things;
The first 4 characters of the Current User’s Username
The last 6 characters of the Current Date/Time UNIX Time Stamp
A randomly generated 3 characters.
This works fine when testing in a Text because I can concatenate strings without using Append.
When creating a workflow to create this order number though, it’s not possible to Truncate a string after using :Append.
Here’s a screenshot of the only way I can get it to work (I’ve had to change the order of the elements of the UniqueRef around…)
Results in
(Mdevernon is the User’s Username - I can’t get it to truncate)
Trying to Truncate the Username…
Result
There’s no UserName (should be MDeVernon again)
Is this expected behaviour or something I’m doing wrong?
Looks like you need to say truncated to 10 after appending the User’s Name.
It seems like after you append the username and then truncate to 4, it is actually truncating the combined string of date and username to 4. That is why you have the first four numbers. If you say 10 then you will keep the 6 numbers from the date and the first four letters of the name.
Thank you so very much! And my apologies for going down the “is this a bug?” path - I’m suitably embarrassed because I thought I’d tried everything! This is the second time today a kind individual has saved me hours of banging my head against a wall trying to do something I’d never have worked out! Thank you again. It really makes sense now.
I can go and have a beer now. Have a lovely weekend.