tthayer
(Trygve Thayer)
1
Working on a BPM to strip the last 4 characters from a string and then convert to an integer.
525012-NRW is the string and in field OrderHed.PONum I would like it to be 525021 as integer and put the code into a variable in the BPM.
This will be used to link back to a sales order number. Thanks in Advance
Banderson
(Brandon Anderson)
2
This is to remove characters.
This is to parse the string to an integer.
tthayer
(Trygve Thayer)
3
Tried to figure it out from the links but did not find anything that helped.
Here is what I have now but it is exactly opposite of what I want. It returns -NRW but that is what I want dropped.
ttOrderHedRow.PONum.Substring (ttOrderHedRow.PONum .Length -4)

Banderson
(Brandon Anderson)
4
ttOrderHedRow.PONum.Substring (ttOrderHedRow.PONum .Length -4,4)
Try that.
Actually the link has Remove instead of Substring
ttOrderHedRow.PONum.Remove(ttOrderHedRow.PONum .Length -4,4)
tthayer
(Trygve Thayer)
5
Well that did not seem to make a difference.

tthayer
(Trygve Thayer)
7
Now to convert that to an integer and we have got it.
1 Like
tthayer
(Trygve Thayer)
8
Got it ! Thanks to the Ninja !!!

1 Like