Forum Discussion
QuickBaseCoachD
10 years agoQrew Captain
Try this. I will use formula variables to break the formula into smaller pieces.
var text Temp = Left([my text field],"x");
Length($Temp) +1
var text Temp = Left([my text field],"x");
Length($Temp) +1
- Jan-WillemSpeck8 years agoQrew Assistant CaptainI would like to go one step further with this function.
1) find a specific chararter combination
ie
var text Temp = Left([my text field],"#%");
Length($Temp) +1
2) from the position where "#%" is located I like to read the next 5 characters
ie Mid([field], <start position>, 5)
if I replace <start position> with the two lines in 1) it doesn't work. I assume it has the do with the variable, the code in 1) or with the ;
Is there a better way to get this?
In an even better scenarion I should perhaps first check if the text string contains the value "#%" at all to avoid wrong output of 1). Currently if it can't find it seems to result in the sting length - QuickBaseCoachD8 years agoQrew Captaindid you try this
var text Temp = Left([my text field],"#%");
var number StartPosition = Length($Temp) +1;
Mid([field], $StartPosition, 5) - Jan-WillemSpeck8 years agoQrew Assistant CaptainNo I didn't.
But what I learn from this is how to define and use variables and that you can treat the formula field also as a field where we can enter pieces of code because that is what you actually doing.
And that opens new possibities, lots of them
What a joy :-)
for the second time today
TXS!!