Forum Discussion
PaulPeterson1
4 years agoQrew Assistant Captain
Thank you Mark! I omitted the first line as I didn't see anyone using an octothorpe in the field, but the rest of it went something like this:
Thanks for the suggestion. Now that I think of it, can I use a REGEX in a formula field?
------------------------------
Paul Peterson
------------------------------
var text Space = SearchAndReplace(Upper([Store Number]), " ","");
var text A = SearchAndReplace($Space, "A","");
var text B = SearchAndReplace($A, "B","");
var text C = SearchAndReplace($B, "C","");
var text D = SearchAndReplace($C, "D","");
var text E = SearchAndReplace($D, "E","");
var text F = SearchAndReplace($E, "F","");
var text G = SearchAndReplace($F, "G","");
var text H = SearchAndReplace($G, "H","");
var text I = SearchAndReplace($H, "I","");
var text J = SearchAndReplace($I, "J","");
var text K = SearchAndReplace($J, "K","");
var text L = SearchAndReplace($K, "L","");
var text M = SearchAndReplace($L, "M","");
var text N = SearchAndReplace($M, "N","");
var text O = SearchAndReplace($N, "O","");
var text P = SearchAndReplace($O, "P","");
var text Q = SearchAndReplace($P, "Q","");
var text R = SearchAndReplace($Q, "R","");
var text S = SearchAndReplace($R, "S","");
var text T = SearchAndReplace($S, "T","");
var text U = SearchAndReplace($T, "U","");
var text V = SearchAndReplace($U, "V","");
var text W = SearchAndReplace($V, "W","");
var text X = SearchAndReplace($W, "X","");
var text Y = SearchAndReplace($X, "Y","");
var text Z = SearchAndReplace($Y, "Z","");
ToNumber($Z)
Thanks for the suggestion. Now that I think of it, can I use a REGEX in a formula field?
------------------------------
Paul Peterson
------------------------------
PaulPeterson1
4 years agoQrew Assistant Captain
There was one additional issue I didn't anticipate. Some of the store numbers had a leading 0. I just changed the field type to formula - text and an getting the desired results.
------------------------------
Paul Peterson
------------------------------
------------------------------
Paul Peterson
------------------------------
- MarkShnier__You4 years ago
Qrew Legend
Thx for posting the full formula. I was going to use "octothorpe" as a formula variable name but I didn't think anyone else knew that's what a # Is called. :)
------------------------------
Mark Shnier (YQC)
[email protected]
------------------------------- PaulPeterson14 years agoQrew Assistant CaptainI can't tell you what I did yesterday, but give me a bit of silly trivia and that gets stuck in my mind forever...
------------------------------
Paul Peterson
------------------------------