Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Newbies

I'm trying to figure out how to tell if a word/phrase/text string is the 1st word/phrase/text string, 2nd or 3rd in a list. I need a number (1-3) returned. It's after midnight and my brain is spinning circles...everything i've tried returns me either text or the the character position. Help, is there a way?

Ginger

Check out the "PositionValue" CF by Geoff Wells.

http://www.briandunning.com/cf/62

If you have a list...

Apple

Banana

Pumpkin

...and you ask for the "PositionValue" of Banana, it will return 2.

Your question is not quite clear. Assuming that by "list" you mean text items separated by carriage returns ("values" in Filemakerese), you can get the ordinal number of a given value in the list by:

ValueCount ( Left ( listOfValues ; Position ( ¶ & listOfValues & ¶ ; ¶ & searchValue & ¶ ; 1 ; 1 ) )

Note that this returns the "value position" of the FIRST occurrence of searchValue in listOfValues.

  • Author
  • Newbies

Thank you for such a quick response! You guys, make it looks so easy! It makes sense now, don't know why I couldn't pull that out last night...!

That is exactly what I needed AND it introduces me to a new function. I'm coming from FM5.5 and trying figure out some of the new (and old) functions. I haven't any experience with the "Let" fuction, but I like it! especially for testing out how other functions works...it keeps the other code cleaner ...it can get confusing quickly with nested functions. Thank you, again.

  • Author
  • Newbies

I knew there was something about the carriage returns (I didn't have/wasn't adding a carriage return to the beginning and the end of the list)! I just couldn't grasp what I needed to do. I had looked at all the functions you used, but not in that combination and I *just* couldn't get it last night! :bang:

Thanks for making it looks so easy! :

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.