13 Replies Latest reply on Jan 7, 2014 4:28 PM by philmodjunk

    Apply a filter by profile type on a Layout

    AbdoulBaldé

      Title

      Apply a filter by profile type on a Layout

      Post

           Hi , 

            

           I have created the following Tables with the relationships shown on the screenshot: 

      FICHES_S'INFORMER:

           - Fiche_ID

           - Catégorie_Titre

           - Catégorie_Titre_FR

           - SelectedContent_ID

      CONTENUS_S'INFORMER:

           - Content_ID

           - Content_Title

           - Content Details

      LIAISON_S'INFORMER:

           - Fiche_ID

           - Content_ID

           - Content_Title

           - Profile_ID

           - Sequence

            

           I have created a portal to display the list of possible Content_Title and the related Content_Details when clicking on Fiche_ID button (Each Fiche_ID has a different button). 

           My issue is to be able to filter the list of all Content Titles by Profile_ID?

           Could you please advise on how to create a button and or a script that will filter all the content depending on the selected Profile_ID?

            

           Thanks, 

           Abdoul.

            

      Screen_Shot_2014-01-07_at_11.12.10_AM.png

        • 1. Re: Apply a filter by profile type on a Layout
          AbdoulBaldé
          /files/6c87e904a4/Screen_Shot_2014-01-07_at_11.46.51_AM.png 1027x352
          • 2. Re: Apply a filter by profile type on a Layout
            AbdoulBaldé
            /files/9b9b5101ea/Screen_Shot_2014-01-07_at_11.46.35_AM.png 1038x421
            • 3. Re: Apply a filter by profile type on a Layout
              philmodjunk

                   I can't tell from your examples exactly how different profiles should affect what content appears. There's no Profile field in your content table so the most obvious method isn't possible until you add that field.

              • 4. Re: Apply a filter by profile type on a Layout
                AbdoulBaldé

                     Hi PhilModJunk,

                     Thanks for your quick reply and Happy New Year by the way. 

                     If you look at the first screenshot, you will see my relationship screen. The Profil_ID is a field in the Joint Table. (LIAISON_S'INFORMER).

                • 5. Re: Apply a filter by profile type on a Layout
                  philmodjunk

                       Yes, I saw it there, but Liason... is not set up here as a join table (it would be in the middle, not on the end) and there's no direct link to Content (CONTENUS...?)  that can use "profile" data to access specific records in Content.

                  • 6. Re: Apply a filter by profile type on a Layout
                    AbdoulBaldé

                         Hi, 

                         My mistake. The portal is based on the Liaison_S'INFORMER Table. (View screenshot) therefore I have several occurences of the same Content_Title (Because in the Liaison Table, there are several records with the same Content_Title ==> 1 for each profil in case content is related to the 3 profiles). 

                    So Let's say I have a Fiche_S'INFORMER Table where:

                         First record  ==> "Fiche_ID" = 1 / "Catégorie_Titre" = Monuments

                    My Layout is based on the table Contenus_S'INFORMER where I have :

                         First record ==> "Contenu_Titre" = White House / "Contenu_ID" = 1.01 /  "Contenu_Détails" = blalalalla / "Fiche_ID" = 1

                         Second record ==> "Contenu_Titre" = Big Ben / "Contenu_ID" = 1.02 / "Contenu_Détails" = hoohohohoh / "Fiche_ID" = 1

                    I also have the Liaison_S'INFORMER Table where I have: 

                         First Record ==> "Fiche_ID" = 1 / "Contenu_ID" = 1.01 / "Profile_ID" = Profile 1

                         Second record ===> "Fiche_ID" = 1 / "Contenu_ID" = 1.01 / "Profile_ID" = Profile 2

                         3rd record ===> "Fiche_ID" = 1 / "Contenu_ID" = 10.2 / "Profile_ID" = Profile 2

                          

                         My problem is that since my portal is based on the Table Contenus_S'INFORMER : The List displayed (see screenshot) can have several times the same Contenu_Titre and I would like to be able to filter the records of the portal by Profile?

                          

                    • 7. Re: Apply a filter by profile type on a Layout
                      AbdoulBaldé
                      /files/2afd870f5d/Screen_Shot_2014-01-07_at_4.23.22_PM.png 1022x799
                      • 8. Re: Apply a filter by profile type on a Layout
                        philmodjunk
                             

                                  My Layout is based on the table Contenus

                             Actually, I can see in your layout that it is based on Fiches_S'Informer bilingue

                             

                                  My problem is that since my portal is based on the Table Contenus_S'INFORMER

                             But your portal is NOT based on that table occurrence. It's based on Liason_S'INFORMER and that is what you need if you want to filter out all related records except for those where the ID and the profile have specific values.

                             Define a profile field in Fiches_S'Informer bilingue and modify your relationship to be:

                             Fiches_S'Informer bilingue::Fiche_ID = Liason_S'INFORMER...::Fiche_ID AND
                             Fiches_S'Informer bilingue::Profil_ID = Liason_S'INFORMER...::Profil_ID

                             and then you can set up Fiches_S'Informer bilingue::Profil_ID with a value list of Profile IDs. Select a Profile ID in that field and you'll see only the related records from Liason_S'INFORMER matching the current Fiches_S'Informer bilingue record's Fich_ID and the selected Profile ID.

                        • 9. Re: Apply a filter by profile type on a Layout
                          AbdoulBaldé

                               Many thanks. It works. 

                               I have another issue now: I have used a radio button set for the Profile_ID selection (in Table Fiches_S'INFORMER) but everytime I click on another object (when I navigate through the different Fiche_ID buttons) , I have to reselect the Profile_ID to view matching records.

                               Do you know which setting allow to keep the selection even when you go to another object (another button for instance)?

                                

                               Thanks.

                                

                          • 10. Re: Apply a filter by profile type on a Layout
                            philmodjunk

                                 Give the Field global storage in Manage | Database | Fields | Options.

                                 Your relationship will still work, but you'll see the same value selected in the field no matter what record is current on your layout.

                            • 11. Re: Apply a filter by profile type on a Layout
                              AbdoulBaldé

                                   Thanks. 

                                   On my Main screen I have a button that will direct to the current Layout (Fiches_S'INFORMER) ,

                                   Is it possible to have the profile selection field in a pop-up window (Message: "Please select Profile") that will determine the records even if the field is not placed on the current layout?

                              • 12. Re: Apply a filter by profile type on a Layout
                                AbdoulBaldé

                                     Meaning I that when I click on the button from the Main screen, I have a  pop up or drop down that will prompt to select the profile and once the profile is selected go to the Layout with the matching records?

                                • 13. Re: Apply a filter by profile type on a Layout
                                  philmodjunk

                                       Yes.

                                       a Pop up menu or a drop down list is simply a different field format than using a radio button. You can place a global field on any layout in your file and it will be accessible and editable.

                                       You can even use new window to pop up a small modal window with a layout where the global field is formatted as a radio button.

                                       And in FileMaker 13, you can put the radio button inside a popover.