Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi i have an issue with concatenation of ordernummer and order row key.
Ordernr | RowNr | % Key |
---|---|---|
100 | 101 | 100101 |
1001 | 01 | 100101 |
i wish to set the length of the Order and the RowNr to 8 respective 5 places.
set len Ordernr = 8;
set len Rownr = 5;
then i wish to do an if statement to check the amount of the characters in the string and where there are missing places replaces with 0
ie. if(len(Ordernr < 8, fill replace(Ordernr,' ', 0) as Ordernr_tmp
and the same for RowNr if required.
i have attached a sample app if anyone has dealt with this before?
Best
Brad
Hi Bradley
an other way is to concatenate like this, and autonumber your key
autonumber(OrderNr & '-' & Rownr)
you'll get 100-101 transformed as number %Key = 1
and 1001-01 transformed as number %Key = 2
best regards
Chris
Hi Brad,
The easy way it comes to my mind is doing like this in the script:
LOAD
Text(Num(Ordernr, '00000000')) AS Ordernr // this will add leading zeroes as needed up to 8 figures total
Miguel
Hi Bradley
an other way is to concatenate like this, and autonumber your key
autonumber(OrderNr & '-' & Rownr)
you'll get 100-101 transformed as number %Key = 1
and 1001-01 transformed as number %Key = 2
best regards
Chris