Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7298 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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.

Posted

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.

Posted

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 ) &

This topic is 7298 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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