Tap Forms Database Pro for Mac, iPhone, iPad and Apple Watch › Forums › Using Tap Forms 5 › Feature Request: FIND text function
- This topic has 6 replies, 2 voices, and was last updated 8 years ago by
Brendan.
-
AuthorPosts
-
October 7, 2017 at 9:00 AM #25202
Mike SchwartzParticipantBrendan,
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
SUBSTRfunction, assuming that you know the position of the “dash”. Hence the notion of adding aFINDfunction.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,
MikeOctober 8, 2017 at 8:12 PM #25265
BrendanKeymasterThat sounds like a POS(STR1, STR2) function. Returns the position of STR2 within STR1.
October 8, 2017 at 8:23 PM #25267
Mike SchwartzParticipantClose 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,
MikeOctober 8, 2017 at 8:35 PM #25272
BrendanKeymasterNope. Not implemented. But your request just reminded me of that from the old BASIC language.
October 8, 2017 at 8:53 PM #25273
BrendanKeymasterPOS(Str1, Str2)be in the next update. It will return the location of Str2 within Str1.October 9, 2017 at 8:36 AM #25283
Mike SchwartzParticipantSounds great! Thanks!
October 9, 2017 at 11:50 AM #25293
BrendanKeymasterI also added
LEFT(X, Y)andRIGHT(X,Y)functions to return the Y number of characters from the string X from the left or right of the string. -
AuthorPosts
You must be logged in to reply to this topic.