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.

Inserting a portal value in a specific location within a text field

Featured Replies

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

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

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.

  • Author

Hi Wim,

Thankyou for the sample file, very much appreciated.

Jalz

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.