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.

Insert values from portal

Featured Replies

Here’s what I have: a text field on a layout and a portal of related values (names of people) along side the text field.

Here’s what needs to happen: when I click a name in the portal a value from that related record is inserted into the text field wherever the cursor was located prior to clicking the name.

Here’s what’s happening: using the Insert Calculated Result script, regardless of which name I select in the portal or where the cursor is located in the text field, the first name in the portal is always placed at the end of the text.

With Filemaker I knows there’s a way. I’m just hoping it’s not to complicated. Thanks for your help. It is really appreciated.

If the button was outside of the portal, then it could be done with a script such as:

If [Get (ActiveFieldName) = "targetfield"]

Set Variable ($start; Get (ActiveSelectionStart)

Insert Calculated Result [select; targetfield; $start; 0; field_data_insert ]

Set Selection [ targetfield; Start Position: $start + Length ( field_data_insert ); End Position: $start + Length ( field_data_insert ) - 1 )

End If

But, the issue that arises is that once the user clicks in the portal, the active field is no longer active. This can be done in FM8.5 because of the new 'Object' naming feature but I dont think it can be done with FM8.

  • Author

I think you’re correct. I tinkered with the Get(ActiveSelectionStart) using the Set Variable and no value was returned whenever I clicked on the portal. Oh well, I thought there might be a work around with FM8. I don’t see us upgrading to 8.5 for a while. For now I can append records with the set field but I was hoping for more flexibility with the insert calculated results.

Thanks for your input.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.