Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

HI all

FM 5.5 Dev on Win XP

I have three files, one a TABLE of linked items, one with a DESCRIPTION about each item and then a MAIN SCREEN for users to make their selections from.

Now the DB's are all related, in that in the MAIN SCREEN users select from a drop down list a list of items available from a value list created from the TABLE, once they select that item the next drop down list is provided which is only showing those records that are linked to the first item, also from the TABLE. Underneath each one when they select is a detailed descritpion of teh item provided from the DESCRIPTION file.

Now all the aobve works fine. But...

After the second item is selected the user can go back to the first item and select another item, but that does not refresh the second item as it should only display the linked items, and results in mismatched items.

Does anyone know how to; if the first item is selected and then the second item is selected, to either stop the first item being changed (unless they click on a reset button or similar) or if the first item is changed the second item is cleared ready for them to make a new selection.

I've Been trying to work this out with no luck and hence turn to you Guru's for help - I hope what I have above is understandable its hard to write down what your trying to do, any ideas?

Thanks

Greg

Posted

I don't quite get it. From what you say, it sounds like you are wanting to "filter" the value list for the 2nd item from the choice in the 1st item. This would mean that the structure is more like "category, item," a hierarchy, rather than "item1, item2," line items.

The latter would mean that each item is a separate record, that Main Screen is a line items file. But then you wouldn't normally call it "Main." Also, if it is line items, with a separate record per item, then the "filter" makes no sense. So, I'm confused.

If item1 and item2 are actually category and item, then there is sometimes a problem if a modified choice is made in the category, rendering the previously selected item obsolete (because it's no longer in that new category).

In that case you need to wipe out the item choice whenever the category is changed, with a script attached to the category choice.

Another way to do this is to use global fields for the choices, only setting them into real fields when both are completed. That way you don't wipe out the user's previously selected item, in case they change their mind after modifying the global category choice.

But then you do need a "Set" button and script (which they may forget to hit unless you check it rigorously). It's time like this one wished for a JavaScript-like "on change" function. A plug-in would work, but they are not cheap.

Posted

Fenton said:

In that case you need to wipe out the item choice whenever the category is changed, with a script attached to the category choice.

Yeh sorry for being confusing, the first ne is category, the second are items in the category, I have a file with all records in it for each category.

Anyway what you say above as quoted is what I want - can you explain how to do that please.

Thanks

Greg

Posted

Ah, then it makes sense. You should wipe out the item choice whenever the user clicks on the Category field.

The logic is that if they are going to change the category, then you must remove the item, because it will no longer be one of those belonging to a new category, and you need to refresh that value list.

So you just write a script that does this, then attach it as a button to the Category field:

Set Field [ Item, ""]

Go to Field [ Category ]

The item will be cleared, the list will drop-down.

This method is simple, but it has the disadvantage of removing a user-entered value without the user actually doing that themselves directly. Which may or may not please them. If they decided NOT to change the category after all, then they'd have to reenter their item again.

The alternative method is to use global fields to make the choices, in which case you can just wipe out the item global, allowing a new list of values for the drop-down, no big deal.

But then you need a button to "set" the global values to the real fields. Neither method is perfect. But with hierarchal values, where the 1st choice determines the range for the 2nd choice, you have to enforce the logic some way.

Posted

Fenton, thanks for your help - the Set Field option should work fine, but if I need to (pending user feedback) I can change it to the Global Field idea.

Many thanks again

Greg

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