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

Perform find in a field with dynamic value list


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

Recommended Posts

Posted

Hi Everyone-

Here's my situation. I am creating a searchable catalog for a customer. To make a long story short, I need to have a value list be dynamic in "Find Mode" so if "company name" has been chosen as a search option, it will come off the value list so they cannot add another search criteria with the same field. To throw another wrench into the problem, I need to only have this happen if the user chooses the "and" option.

I have found similar postings for this, but they do not work in find mode as far as I can tell. I just can't seem to wrap my mind around this one!

I am running in OS X Jaguar and Developer 6.

Thank you all in advance!

-Renee

Posted

Since relationships aren't valid in Find Mode, conditional value lists won't work.

...if "company name" has been chosen as a search option, it will come off the value list so they cannot add another search criteria with the same field.

I'm not sure what you mean here. Are you trying to restrict the number of Requests for a particular field?

To throw another wrench into the problem, I need to only have this happen if the user chooses the "and" option.

Again, not sure what you mean. Where is this "and" option? If you're taking about specific field choices that you have built into your interface, then I think we'll need a little more detail. Maybe a screen shot.

You could use conditional value lists on global fields to enter the requests while in Browse Mode, then enter Find Mode, and stick in the values that are in the globals. This is pretty straight forward if there's only one Request allowed. If you need multiple Requests, you'd need to store them in another file, then loop through them to build the Find. It might be easier to use relationships to pull up the found sets.

Posted

Since relationships aren't valid in Find Mode, conditional value lists won't work.

This is not precisely true. Global relationships are still valid in Find mode, at least for filtering Value Lists. But since global fields cannot be manually entered in Find mode, one tends to not use them. I had to once, for filtering some things which were otherwise just too difficult to know what to enter. What I discovered was that global fields can be set in Find mode, using Set Field. Then the global must be committed, then go to the field to be filtered. In other words, entering 2nd field must run a script first, setting a global to the value which was entered in the 1st field. This filters the value list. You cannot tab into that 2nd field or it won't work (unless you use a script trigger plug-in; haven't tried that).

It is easiest done on a dedicated Find layout. Otherwise you have to stack the fields, and it's a bit tricky.

And I'm afraid I don't know what Renee is asking either. I can't tell if it's a filter or a validation that is wanted. I've never considered validating in Find mode; but I know it can't be done using relationships on regular fields, and you'd never want to validate using a global relationship.

FindVL.zip

Posted

Thanks for all your replies. I will try to clarify myself--

Basically, a user will see a screen where they have a pull down to choose the field they wish to search and then have a field to enter the search criteria into. They can then choose to add another find request and can choose to add it to the previous request: "and" or create a seperate request: "or" which would be done in a script when the "perform find" button is clicked. Here is the dilemma: If they choose "and" where it will put the info entered into the previous find request, I do not want them to be able to choose the same field again. This needs to happen before the find script is triggerred. For example, 1st request is for "company name", I do not want "company name" to be on the pull down for the 2nd request if they choose "and". If they choose "or" it can be on the pull down because they are seperate find requests.

I hope I made that a bit clearer--I'm having trouble keeping it straight in my own head!

Thanks again!

Posted

What about users defining a find request in Browse mode, then using Constrain or Extend script steps to walk through their find request? Attached file is a rough layout of what I describe. The hard part would be getting your FieldNames into a seperate DB but maybe you can easily do that with FM Server? I think it will also rely on being able to Set Field[FieldName; ...] where FieldName is the result of a calculation.

VLSearch.zip

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