March 12, 200817 yr I have a layout that displays every single record in an Items table, including the archived items, (which are archived via a Status field). I want to be able to select that layout from the layout dropdownlist and immediately have the item list show only active items. I don't want archived items to show up initially unless the user wants to see them. I know how to do this with a button, but I don't know how to do it automatically when the layout is selected. Is there a way?
March 12, 200817 yr Well there are a few different ways to go about this. FileMaker does not have native Event Triggers, so if you wanted to have them, you would have to use a plugin like EventScript or ZippScript. However, it seems as though it could be handled differently. What is the purpose of having it doen this way without using a script or relationship that can filter? Are you allowing the users to select any layout they want from the Status Area?
March 13, 200817 yr Author What is the purpose of having it done this way without using a script or relationship that can filter? Are you allowing the users to select any layout they want from the Status Area? Purpose: In this case, the user needs to be able to see all the items in the database, but normally, they would only want to see active items. It would be a rarity to look at items with a status of "archive" or "delete" so I wanted the default layout to filter/show only the active items. I am using a script that can filter now, but I only know how to make it run with the click of a button. I don't know how to make a relationship filter by a table's field's value that doesn't relate to a field's value in the other table: I have an items table and a status table. Of course, they already have a relationship connecting them by Status_ID. Is there a way to make a copy of the tables in the relationship diagram that would relate the tables by Status_ID AND filter only the items with a status_ID of 1 (which equals "active")? Or is there a different way this should be done? I am not allowing the user to select any layout they want, just the ones that pertain to their job. But I don't know how to make a layout just show the active items without first showing everything and then clicking a button to run a script to show only the active items.
March 13, 200817 yr A layout cannot be defined to filter records automatically. Either use a portal, or script everything tightly, so that when users want to go to a layout, the script takes them to the layout AND performs a find, and when users want to archive a record, the script sets the status field AND omits the record.
Create an account or sign in to comment