If you expect more variety than the examples you gave and really need to find the sequence inside the last set of parentheses in the Product description field, you can try the following function. This will also find part "numbers" in parentheses containing spaces, decimals, commas, slashes, and so on.
prodDesc = Product description;
posnOpen = Position(prodDesc; "("; Length(prodDesc), -1);
posnClose = Position(prodDesc; ")"; Length(prodDesc), -1)
posnOpen = 0; "";
posnClose = 0; "";
Middle(prodDesc; posnOpen +1; posnClose - posnOpen-1)
I'm sure there are many ways to do this. Attached is a file you can try that parses your example. Since it isn't clear how many part numbers you will end up with, I put them in a related table. If you have Pro Advanced, you can step through the script with the debugger.
This approach treats the text in the description field as a list. It then takes each line in in the list and turns it into a list by changing the ( to a Pilcrow ( carrige return ). It then steps through the items in the line list and pulls out the part numbers. All the work is done in the Parse Description script.
Parse Description.fmp12.zip 68.2 K
Or perhaps rightwords(<fieldname>; 2 )?
In FM anything but a-z and 0-9 is treated as splitting words I seem to recall?
Hi there Andrew,
This is perfect. Very simple but it works Thank you very much!!
Thank you so much for all your input. It seems, there are quite a few ways of doing it. The simple Rightwords option seems the best for this instance but thank you for the other options, I will try and store those in my memory banks for future projects. This forum never fails to impress me with the quality of the users.