14 Replies Latest reply on Dec 20, 2012 2:17 PM by LaRetta

    Filtered Relationship or Finds?


      Hi All


      I have two types of events. Private and corporate. I want to be able to click on a button and if I select private it will only show private records. I know I can have the button do a find for all private but then if the user clicks show all itll show corporate events as well. Is there a way to not allow them to do that? Or is there another solution to do it without finds? Can I do it via a relationship?

        • 1. Re: Filtered Relationship or Finds?

          it depends on your context - i assume you are on fm12 - if you are in browse mode you can have an OnModeChange trigger and capture find mode - so if they switch to show all it will ignite that trigger and do within an omitting find to omit the records you dont want them to see. ...


          there are always many ways.


          good luck.

          • 2. Re: Filtered Relationship or Finds?

            If the functionality should be tied to a user's privileges, check out Record Level Access in the privilege set... It's one way of making sure the user can only see records that they have rights to

            • 3. Re: Filtered Relationship or Finds?

              Im actually on fmp11 but that sounds great if Iwere in 12

              • 4. Re: Filtered Relationship or Finds?

                I was thinking of that but I dont want them fully restricted.  I wanted it so that if they are in a specific layout they can only see corporate events or If they click corporate there found set wont be changed unless they click private events.  Is there a way to lock their found set?  Or maybe I can take show all off the menu set for that layout? Any other ideas?

                • 5. Re: Filtered Relationship or Finds?

                  will work as well in fm11

                  • 6. Re: Filtered Relationship or Finds?

                    Try Go to related record

                    • 7. Re: Filtered Relationship or Finds?

                      You can create a custom menu set where you either (a) remove the "Show All" item, as you've mentioned, or better still (b) connect the "Show All" menu item to a script that performs a Find for the records that you consider to be "all" in the current context. Redefining the menu item will also redefine the functionality of the "Show All" button in the Toolbar.

                      • 8. Re: Filtered Relationship or Finds?

                        And it is more than just Show All.  Protect from Extend and Show Omitted as well.   Also find and GTRR are same.  If you have existing relationship built then you can use GTRR ... it is personal preference but why add another table occurrence needlessly?  True that you may possibly need to add a layout with a find also but at least they can go in folders unlike graph clutter.


                        You can still allow Users to perform a find since privileges will omit unauthorized records anyway so why take that away from them? As Jim indicates, Custom Menu can restrict and replace those options and locking down the interface is suggested practice anyway. :-)

                        • 9. Re: Filtered Relationship or Finds?

                          I should also mention another (probable) difference between find and GTRR ... adding another layout (which is rarely needed for a find) uses less resource than a table occurrence.  It is my understanding and observation that an import will run slower if there are many related TOs than if ran from TO with no relationships.  Table occurrences are cheap but not always free.  :-)

                          • 10. Re: Filtered Relationship or Finds?

                            This supposition has not been tested in depth but stem rather from personal observations over time. 

                            • 11. Re: Filtered Relationship or Finds?



                              There are a lot of ways to approach this, and any firm recommendation needs to be deeply rooted in your file structure, security and UI. Some general thoughts:

                              -"Saving" windows is a great way to save found sets. When you are on a found set, if you do a new window, rename it, and move it off-screen or hide it, it preserves the found set. Then it's just a matter of restoring the window, and perhaps renaming it.


                              -Scripted finds work best in list views, where filtered portals obviously aren't useful. We're doing more and more of this and it's incredibly fast (if the finds are indexed). We've done a several implementations where a find happens on each keystroke, filtering the list as they type. Because this is a scripted event, you can add additional criteria to the find to control/limit what is displayed. This can be great for on screen reporting and viewing of large record counts. We've also used a radio button field in the header with an "On Modify" script trigger to allow clients to find specific record sets. A recent example was to filter an inventory list by product categories. With one click the user could change the list view to the appropriate found set.


                              -Filtered portals are needed/most useful when the information is a subset of the currently viewed record. Typically, when you are in a form view and want to filter some options for the user for the current record.


                              -Portals also work best for Parent/Child record building. When you create children across relationships you get referential integrity built-in.


                              -Filtered relationships/GTRRs work best for specific events and navigation. For example, you are on a customer's record and want to quickly navigate to their specific history records in another table/layout. One GTRR script step does it all; if you have it create a new window, your current found set is also still available in the original window.



                              Bob Gossom

                              • 12. Re: Filtered Relationship or Finds?

                                Would I be able to view only Corporate Events if I filter the relationship to only show Corporate events? Or would that only work for portals?

                                • 13. Re: Filtered Relationship or Finds?

                                  Would I be able to view only Corporate Events if I filter the relationship to only show Corporate events?


                                  Yes, you can create a relationship that will see only corporate or only private records.

                                  • 14. Re: Filtered Relationship or Finds?

                                    Yes but only through portals.  Otherwise you are performing a search on a standard table which circles back around to the points above.  :^)