Blue Prism, Calculation, Replace, Extract Number

M.p picture M.p · Apr 29, 2018 · Viewed 13.4k times · Source

I need to extract numbers from the a text in calculation stage in Blue Prism. The text is "Please take note of your order reference: 123" The number"123" changes every in each case, every time a new order has been placed. I need to extract the number from the end of this and into a data item. I am currently using:

Right("Please take note of your order reference:","3")and it is not working.

Any advise would be greatly appreciated.

Answer

johwes picture johwes · Jan 24, 2019

I just finished the Developer 1 course for BluePrism and had the same excercise. I used this string:

ToNumber(Replace([Save ordernumber], "Please take note of your order reference:",""))

It removed the text from the string, replacing it with nothing (""), and then creates a number out of the data left in the string. And voilà, you have your ordernumber.