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

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

Recommended Posts

Posted

Hi all,

I think my title says it all, but I' eloborate further. I have two tables, table_1 and table_2. I have a text field in table_1 where I have typed in some text, however I have a portal on that layout which shows values of a field called "Value" from table_2. Depending which portal record the user clicked (that is the insert button), I would like that value to go in the text field in table_1 in exactly the same position where the cursor is. Is this possible, as I have not found a command to get the position of the cursor within filemaker

My script at the moment is (which only brings the first value in at the end of the text even though the cursor is in the middle)

Insert Calculated Result[Table_1::Text;Table_2:Values]

Attached is a screenshot of what I am trying to build (I would like any of the values to go in between the two paragraphs of text)

Any advice help would be appreciated.

Many Thanks

Jalz

file.png

Posted

Here's one approach that uses copy & paste. Not very friendly to the user's clipboard so you can enhance it by replacing the paste with a routine that inserts the selected portal value in the target field, using the left & right functions.

TextInsertion.zip

Posted

A quick note:

the approach relies on the onExit trigger on the target field, that one gets fired when you click the portal row button but before the portal row button script runs so it has time to capture the positiono of the cursor in the target field.

Posted

Hi Wim,

Thankyou for the sample file, very much appreciated.

Jalz

This topic is 5424 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.