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.

How do I identify the row number of the active selection?

Featured Replies

  • Newbies

I have been trying to find an answer to this question? Up to this point I am stumped.

I have a list of words in a global field. I want to get the line number of the location of word based upon the location of the cursor in the field. For example, if the list showed:

carrot

celery

broccoli

spinach

and the user had their cursor next to the word broccoli the computer would return 3 for line number 3.

I would appreciate any help I can get in this matter.

Thanks,

Toby

As a guess, I'd suggest using the cursor position function to work out where it is in the string; then truncate the string to the cursor position and work out how many carriage returns are in the truncated string, and with this information work out the line number.

That sounds good:

Let( [ 

   cursor = Get(ActiveSelectionStart) ; 

   text = Left( veggiesField ; cursor ) ; 

   lines = ValueCount ( text ) ] ;



  lines )

  • Author
  • Newbies

:smirk: Thank you for the help. The calculations below worked great. I really appreciate the prompt replies. Have a great day. :smirk:

Let( [

cursor = Get(ActiveSelectionStart) ;

text = Left( veggiesField ; cursor ) ;

lines = ValueCount ( text ) ] ;

lines )

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.