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.

Keeping Text Selection Values When Exiting a Field

Featured Replies

  • Newbies

I have a puzzler in a Filemaker solution I'm working on.

Here's the set-up. There's a text field where the user is writing a paragraph of text and another global field with a drop down value list - in my case, mail merge codes. There's a button that the user can press to insert the current content of the global field into the current selection point of the text field.

So the user is supposed to type something in the text field (perhaps within a paragraph), leave the cursor where they want to insert something, select an item from the global drop down list of codes, and then click a button to insert the global field contents back into the text field at their selection point.

The problem is that, after the user chooses an item from the global, the Get (ActiveSelectionStart) and Get (ActiveSelectionSize) functions will point at that global field and not at the text field. I can't think of a way of saving the last position of the selection of a field once the user has left that field.

What I think I need is some method of storing the Get(Selection) values on exit from the Default Text field. Can anyone think of a way to do that? Any cool tricks, perhaps, with validation routines?

Thanks for help on this issue.

You got the idea. You don't store it "on exit." But (I just realized) you can include the Get (ActiveSelectionStart) as the script parameter, in your "Insert" script; which will Set Selection to Get (ScriptParameter), then Insert.

Hey guys,

I think I've come up with a potential solution. I've done some early testing and it works, but need more testing. Here's the skinny:

Assume my table occurence is called 'tablename', my letter field is 'textField' and my pick list field is 'gText'.

Step 1: Create a calc field that uses the evaluate function

cPosition = Evaluate("Get ( ActiveSelectionStart ) &

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.