2 Replies Latest reply on Nov 17, 2008 8:13 AM by Orlando

    Conditional or filtered record set in layout

    BenBrandenburg

      Title

      Conditional or filtered record set in layout

      Post

      Hi,

       

      I want to make a layout which contains only the records from a table that match certain criteria. E.g. I have a tabel of users containing a user-type (A or B). I want the layout to display only users type A.

       

      I only found info on conditional display of fields so far, not on contitional display of records.

       

      Thanks for any clarity (even saying it's impossible, so I can stop looking)

        • 1. Re: Conditional or filtered record set in layout
          Dirk
            

          You could set up a second table that has a field 'fk_usertype'. On its layout, you create a portal that shows the info from the users over the relationship fk_usertype = user type.


          If you enter an A in the fk_usertype field, you see the users of type A, if you enter a B you see the 'B users'.

          • 2. Re: Conditional or filtered record set in layout
            Orlando
              

            Hi BenBrandenburg

             

            Welcome to the forum, 

             

            If you want to see the records in a list, which you then click on to view more details, you have two options, 1 you could use scripted find requests to control what the user sees, or you could do this using a portal, and you can even make the portal dynamic to.

             

            1)

             

            Set up a layout to be viewed as a List and set up scripts using the Perform Find step, specifying your criteria, and then setup buttons to go to the layout which include performing the find. Or you could have buttons on the layout that the user can click to perform the find and filter the list.

             

            You can then add additional criteria to the script step if required. 

             

            2)

             

            If it is simply one field you want to filter on, they you could create a global field called gTypeFilter [global; text] and then create a Self Join Relationship that will be between your global and the UserType field

             

            gTypeFilter  --=-- UserType

             

            On the layout you want to see only the one user-type, create a portal based on this new relationship and either on login, or when the user preses a button to go to the layout set the field to the value, A or B, that you want to display, you can use this layout and portal for both views.

             

            With this you could put the global on the layout with a pop-up menu, with values A and B. and the user can select which type they want to see.

             

            And then to complete it, on the portal row have a button that will go to the related records detail screen.

             

            I hope this does the trick or at least gets you on the right track.