PartNumber::Number = 12345-123-12
When I use Last ( PartNumber::Number ) + 1
It comes up as 1234512313
What is best way to achieve? Replace or Left/Middle/Right or maybe Substitute?
...got that part.
What are you trying to achieve with it?
You are trying to use Last ( PartNumber::Number ) + 1 as an attempt to do what?
Change the last digit to + 1 or 13 in example case.
I used this and seems to be working... maybe there is a better option...
PartNumber = Last ( PartNumber::Number ) + 1
Left ( PartNumber ; 5 ) & "-" & Middle ( PartNumber ; 6 ; 3 ) & "-" & Right ( PartNumber ; 2 )
is PartNumber::Number defined as text or numeric?
Take a look at the set serial increment finction.
the Last() function works with specific fields, but is not a way to get the 'tail-end' of a text/number.
follow Phil's advice:
And keep in mind that it's pretty easy to get duplicate values in such a serial number if this is a hosted solution where two or more users might be creating records at the same time.
Retrieving data ...