October 13, 201213 yr Filemaker Pro 11 Adv Can't locate a (Get CursoPosition) function. I'm looking to cut the text from a "INSERTNOW" field and place it in a "NOTES" field, at exactly the point where I have the cursor positioned. Cursor position will change from record to record, according to my needs. I would manually move the cursor to a different location in the field, for each record. IE: sample text in the "NOTES" field: What the world needs now is love. Should I have the cursor at the end of the word What, I'd like to insert the text from "INSERTNOW", at that point. OR Should I have the cursor at the end of the word needs, I'd like to insert the text from "INSERTNOW", at that point. Wherever the cursor is, is where I need the text to be inserted, simply by pressing a button. It's the script in the button that's driving me to drink! lol Any help is greatly appreciated.
October 13, 201213 yr The Insert Calculated Result [] script step should do what you want. Be careful with the button placement so that you don't exit the field by clicking it.
October 13, 201213 yr Author Thank you.......what would the script you suggest look like, please. And..."Be careful with the button placement" ..Hmmm..I don't see a way to depress a button without leaving the field.Wow is me......
October 13, 201213 yr See the attached example. InsertCalcResult.fp7.zip I don't see a way to depress a button without leaving the field. As a rule, clicking a button does NOT change the current active object. However, if the button is placed in a portal, for example, the context changes and the selection is lost.
October 13, 201213 yr Automatic message This topic has been moved from "Database Schema & Business Logic → Custom Functions" to "Database Schema & Business Logic → Managing Scripts".
October 13, 201213 yr Author Thank you for the example download. I'm looking over your download and it's beyond my understanding. I am looking for a script that will paste the entire contents of a field into another field, exactly starting at the point where the cursor is, in that other feld. It has to be dooable.....I just cannot see the way to accomplish it. Any thoughts? If so...an example would be perfect.
October 13, 201213 yr I am looking for a script that will paste the entire contents of a field into another field, exactly starting at the point where the cursor is, in that other feld. Isn't that exactly what my file does? Place your cursor anywhere in the Text field, click the button and the entire contents of the gPhrase field will be inserted at the cursor location.
October 13, 201213 yr You don't need script ... Michael used a button (which is like a script that you assign directly to the button); right-click the button (and select 'button setup' to see it). If you insist on a script, make a script with only that same script-step in it instead. :^) added blue for clarity Edited October 13, 201213 yr by LaRetta
October 13, 201213 yr Author Yes indeed it does however I'm looking for text from say Field 1 to be placed into the gPhrase field. I hope I'm explaining it correctly. To be exact...I have a feld created that has text ( Field 1)...I want whatever I have in (Field 1) to be placed into gPhrase, after the cursor, wherever the cursor is positioned at the time I press the button to activate the script. What I'm actually seeking is a script that will take whatever is in (Field 1) and place it into gPhrase...but I do not see any scripts in your file. Am I being clear?...and I do thank you for helping me.....but what you provided is a little beyond my understanding. LaRetta! !!!!! Thank you, yet again.....gheese LaRetta.....you're the queen of FMForums! !!! :-) Huggers!
October 13, 201213 yr .I want whatever I have in (Field 1) to be placed into gPhrase Just change the names around: the button places whatever you have in gPhrase into the Text field (actually, into any field that happens to contain the cursor).. I do not see any scripts in your file. As LaRetta explained, this is a one-liner, so it can be attached directly to the button.
October 13, 201213 yr Author I'm working on this now. Thank you both for clarification. :-) One question though....would a solution also be to use Get(ActiveSelectionstart) ? If so....how would it be accomplished?
June 20, 20169 yr Newbies Hi all, i have same problem!! As you told field selection gets changed if button is on the portal but unfortunately I need to develop the same functionality and my button should be on portal. Please help me to develop this thanks in advance!!
June 20, 20169 yr 3 hours ago, Challa Ramesh Chowdary said: my button should be on portal. Then you don't have the "same" problem. It would probably be best to start a new thread for this, but in a nutshell: you need to remember the current selection when exiting the target field, and use it in the script attached to the button, that would look like this: Set Selection [ ... ] Insert Calculated Result [ ... ]
June 20, 20169 yr Newbies To use this we should know the position where data should be added and we can get the position by adding script trigger with Get(ActiveSelectionstart) function. If i use this i should commit first but i don't want to do that. Is there any way to get any other way because my solution environment should be like above attachment .
June 20, 20169 yr 6 minutes ago, Challa Ramesh Chowdary said: we can get the position by adding script trigger with Get(ActiveSelectionstart) function. Yes, that and also the Get ( ActiveSelectionSize ) function. 6 minutes ago, Challa Ramesh Chowdary said: If i use this i should commit first I don't see why. Just trigger the script OnObjectExit attached to your target field. 7 minutes ago, Challa Ramesh Chowdary said: my solution environment should be like above attachment No, if your buttons are in a portal, then your solution cannot be "like above attachment". I have made this point repeatedly throughout this thread, and also in my first response to you.
Create an account or sign in to comment