November 29, 200421 yr 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.
November 29, 200421 yr 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.
November 29, 200421 yr 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