Brendan,
Please consider adding a FIND function like the one in Excel:
FIND(find_text,within_text,start_num)
, which returns the numeric position of the found text.
I was thinking about a solution/workaround to Jose’s use case in another thread (Pick Lists Request). I had suggested that he create a set of pick list values that start with a short code followed by a verbose description, and then to shorten his column width in multi-column view to display only the initial short codes. He responded that his short codes would be varying lengths, meaning that the display wouldn’t look clean. I suppose he could pad out the shorter short codes with spaces, but I was thinking of a different approach.
That approach would be to use a calculation field to return just the initial CODE portion of the lengthy CODE_space_dash_space_VerboseDescription field. Easy to do with the SUBSTR
function, assuming that you know the position of the “dash”. Hence the notion of adding a FIND
function.
I think it would have a lot of general utility for string manipulations. I’m not at all advocating this as an alternative to Jose’s request; just something else to think about adding.
Thanks,
Mike
That sounds like a POS(STR1, STR2) function. Returns the position of STR2 within STR1.
Close enough! Same thing only without the third parameter. Is the POS(STR1,STR2)
function implemented in Tap Forms? I don’t see it in the Functions list of the Edit Formula sheet.
Thanks,
Mike
Nope. Not implemented. But your request just reminded me of that from the old BASIC language.
POS(Str1, Str2)
be in the next update. It will return the location of Str2 within Str1.
I also added LEFT(X, Y)
and RIGHT(X,Y)
functions to return the Y number of characters from the string X from the left or right of the string.