Skip 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.

Getting Value From Portal Fields

Featured Replies

I have a portal with a single field in it. That field is defined as a button. I want to be able to return the contents of the clicked field when I click on it. In other words if the portal list looked like this:

Mary

Sally

Bob

... and I clicked on the word Bob, I need a function that will return the word "Bob". I have tried get(activefieldcontents) with no luck. Any help?

Thanks

Hi Crapples

What do you mean by by "Return"? Do you want to copy the data to another field or just plain copy the data to the clipboard.

If it's copy to another field just use the setfield script step and choose the related field. If it's just put to clipboard, use the copy script step.

hth

Michael

Shouldn't we raise the yellow flares here?? Interactions with the clipboard is a big no-no, unless the use is to use the data in another application, not run by filemaker...

--sd

  • Author

Thanks for the reply. What I mean by "return" is that I want to take the value of the clicked-on portal row and set it as a variable. Then move to another table and perform a search based on it. But I can't find the script step that will "get" the contents of the field that I click on. I'll see what I can do with the copy step right now.

I agree soren it can cause mass problems witin filemaker but if the user wants to paste that data in an outside source then I think it can be ok as long as the script is one step ONLY

Copy[PO_Number] for example.

If the data is to be pasted to another field in Filemaker then Set Field is the way to go for sure.

Have you tried just using the name of the field? Don't use the Copy script step, AudioFreak mentioned that because it was unclear what you were trying to do. It's not appropriate. W

What you want is Set Variable[$field; relatedtable::Field]. $field is the variable declaration. relatedTable::field is the field with Sally or Bob in it as defined from where you are.

Then in your script, you Go To Layout and Set Field [table::field; $field].

Use the Set Variable script step to put the value in the variable. Then use the set field script step using the stored variable before the perform find script step. If you need an example of this I will write one out for you.

hth

MIchael

  • Author

D J - That worked. I'm actually surprised it did, but it did. Now that I have the contents of the field in the variable, I can go forth and use if for other things. Thanks a lot for your help.

BR

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.