Jump to content

Search records with drop-down list


d²c
 Share

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

Recommended Posts

Hi dear helper,

I am new in FM8, so here's my big question:

I have a drop down list on my layout, and would like to enable the search feature on this.

If the user chooses an option from the valuelist in the dropdown list, FM should automatically search for the records that match this option.

How should I do this?

tnx in advance,

Regards,

Edited by Guest
Link to comment
Share on other sites

You will have to use a plug-in that will run a FileMaker script. There are a lot of them out there. Some are free. In fact, I believe the sample plug-in that comes with FileMaker 8 Advanced has this feature. Others include oAzium Events, SecureFM w/MenuMagic, etc. You can search the forums and FileMaker.com to try to find others.

You then make the field you have with the drop-down list an auto-enter calc field and put the call to the external plug-in in the auto-enter calc making sure to include the field itself in the calc. By including the field itself in the calc, you make sure that the auto-enter calc calculates when a change is made to the field AND it ensures that the contents of the field are not erased.

So, it would look something like this:

SearchField & External("EventPlugin"; "YourFindScript"), where SearchField is the field with the drop-down.

Link to comment
Share on other sites

Welcome to the Forums!

One way to do this is to create a relationship between the field with the drop down list and the match field. Then setup a portal to use this relationship. The portal will only display records whose match field is the same as the current item in the drop down.

For the actual implementation, the drop-down list's value will usually go in a global, since the value is used only for displaying. This method also allows each user to view a different set of matching records (globals are local to each user).

Link to comment
Share on other sites

Thanks a lot for your fast responses, this is idd a very good forum!

I am currently reading "The missing manual" from O'reilly, is this the book to get a good start? Or do you guys have better suggestions?

Greetz,

Link to comment
Share on other sites

This topic is 5758 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
 Share

×
×
  • Create New...

Important Information

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