PaulPeterson1
3 years agoQrew Assistant Captain
Is it possible to extract just the numeric part of text field?
I have a field that will contain a number that I need for other activities and know there will be too much push back if the users are asked to go back and modify the data. The problem is further compounded by a lack of a standard entry format. My current approach is:
------------------------------
Paul Peterson
------------------------------
var textlist values = Split([Number test], " ");
var text valOne = Part(ToText($values), 1, ";");
var text valTwo = Part(ToText($values), 2, ";");
var text valThree = Part(ToText($values), 3, ";");
If(ToNumber($valOne) != 0, ToNumber($valOne),
ToNumber($valTwo) != 0, ToNumber($valTwo),
ToNumber($valThree) != 0, ToNumber($valThree))
This will handle the majority of the cases, but I cannot be positive that a user will not have more than two words before the store number and in some cases the user did not leave a space between text and the store number. I'm not sure I can do much about the latter.
I'm hoping someone has a more effective solution to this issue.
------------------------------
Paul Peterson
------------------------------