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

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


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

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

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

Posted

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

Posted

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

Posted

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.

Posted

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.

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