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.

pop-up or drop down field to look up a record on a layout

Featured Replies

Hello All,

I am perplexed. What I want is to use the pop-up or drop down field to look up a record on a layout. I have tried this without tabbed layout and with tabbed layouts. When I find the record in the list the FM thinks I am wanting to change the Primary Key for the contact.

The lookup is in a value list. Is this my problem? Does it need to be a different way?

John

Iy sounds as if you are not in find mode. If you are in browse mode then the assumption is that you are trying to edit the field that the value list is attached to. In find mode selecting a value in this way and pressing enter or clicking the find button in the status area on the left side will find all records for which the field contains the value.

You can use a triggering plugin to do what you want from browse mode. Create a global field that validates with MMScript or EventScript (I am sure there are others too) and set it to trigger a Find script when the field is modified.

why does he need a plugin a simple self-relationship with a global field won't do???

Because occasionally a self relationship does not return the desired result. In a self relationship you are looking through the current record at other related records. This can cause some loss of expected functionality. It also screws up functions like deleting the current record (oops! not the record you think you're looking at!). The record you are actually in may not be the record you are intending to delete, ie. the one shown by the relationship. It is still great for basic, down and dirty filtering. But one must be careful of the hidden peripheral complications.

On the other hand, using one of the free and stable plugins allows you to use that same "drop down menu" to call any fantastic complexity of actions (and interactions) which could be totally transparent to the user. You would be able to direct the result into a form that allows natural interaction without perverse side effects.

I have attached a proof of concept file ant the required plugin for study. The plugin is free via www.Softs4Humans.com. The demo I built here in just five minutes is super basic just to demonstrate a point. Note the field auto enter calculation. That part is critical. I left my notes in the calculation just so you can see my learning process. The Switch Account button is a meaningless artifact from the file I cannibalized to do the demo. Ignore that detail.

Beginner...pfft! Who sets this value? I'll settle for Intermediate at least. I won't claim to qualify for advanced.

EventScript.zip

I've attached what I believe is what djmike275 is suggesting.

I also agree with SurferNate that there are negatives in such a solution.

I can't seem to get SurferNate's solution to work, and I noticed that there are two missing fields in the Event script in the Set Field entry, is this part broken ?

I'm still learning about EventScript . . .

Navigation.zip

I works for me but it will not allow me to define database so I cannot view his notes in the field

Also still exploring Eventscript....

Phil

SurferNate, go to your Control Panel via 'My Profile', then click the 'FileMaker Questions' link.

Sorry about the silly define database thing. Just switch to administrator via the button provided. What I sent was one of my little test files that I hack up all the time to test new ideas. At one time I had to switch from admin to a regular user constantly so I scripted a button and neglected to delete it.

I'm not sure what got broken along the way. If I have more time I'll clean it up into a responsible tutorial. I left too much mess.

The concept is really very simple. The field has an auto enter setting that calls the EventScript plugin. EventScript then calls a normal script that can perform whatever action you like. One beauty of this is that with a very small calculation you can add functionality and direct the course of a user's actions quite reliably. Add upon that that the script occurs on a calculated, per field, basis, and you can avoid some of the pitfalls of pure relational control.

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.