5 Replies Latest reply on May 24, 2010 12:25 PM by mrvodka

    Any SIMPLE way to filter portal records?

    LeoB

      Title

      Any SIMPLE way to filter portal records?

      Post

      So far all the searching and reading I've done all use complicated methods and/or globals to do this.

       

      Simple database -- two tables: Activity and Issues.  All issue records are tied to one, and only one, activity.

       

      In the Activity layout I want to use tabs for Open Issues, Closed Issues, All Issues.  All Issues is easy.  But trying to figure out how to show just open issues under that tab seems to be incredibly complicated.

       

      Any ideas?

       

      Thanks

        • 1. Re: Any SIMPLE way to filter portal records?
          kapitaen_1
            

          in your activity table you must add another field, issuestate, text, global.

           

          and this additional field must be included in the relation from activity to issue, so that both activity and issuestate form the relation.

           

          then you "only" have to find a way to set up issuestate inside of activity. i think best way would be something like a radiobutton selection field, trigger on field change, and the script has to select the desired tab.

           

          or ... make three fields inside activity, issueopen, issueclosed, oops, only two field.

           

          and you need three relations.

          first ... only based on activityid

          second ... based on activityid and issueopen

          third ... activityid and issueclose

           

          and make on each of the three tabs the portal be baseed on anotherone of the three relations

           

          greetings from germany

          chris 

          • 2. Re: Any SIMPLE way to filter portal records?
            Steve Wright
              

            In the Issues database, I take it you have a field such as Issues::Status if so....

             

            1. All you need is a global field in the activity table.. so add  : activity::g_StatusDisplay

             

            2. Add this to the relationship you currently have setup so you have :

             

            Activity                - >   Status 

            activity::g_StatusDisplay = Issues::Status

             

            3. Set up a value list Status, with the values of : Open and closed on the second line 

            4. Setup the field activity::g_StatusDisplay to use this value list as a checkbox type and put it on your activities layout.

             

            Now what you have is a checkbox which lets you select however you want to show the info

             

            Open and Closed

            Open or Closed

             

            No need for tabs, or duplicate portals.

             

            • 3. Re: Any SIMPLE way to filter portal records?
              Sherb

              i AM HAVING THE OPPOSITE PROBLEM. i CAN FILTER AND DISPLAY SAY OEN OR CLOSED ISSUES, BUT CANNOT DISPLAY ALL ISSUES IN A PORTAL.

              • 4. Re: Any SIMPLE way to filter portal records?
                aammondd

                Here is a trick you can use

                 

                You need a second field in your issues table "filteron_off"

                 

                You need to ammend the calculation in your portal key to be an if(filteron_off = "X" ;issueid;issueid&status

                 

                Then you set a script trigger to loop through all the records and set the filteron_off = "X"

                 

                something like

                if[globalportalkeyfield = 'All"]

                Go to Layout[ Issues]

                Show All{}

                Go to Record {first]

                sett Variable[$loopcount; 1]

                Loop

                 Set Field{filteron_off; "X"}

                Exit loop if $loopcount = Get(Foundcount]

                 set variable $loopcoung = $loopcount+1

                 Go tlo Record[next]

                EndLoop

                Else

                Loop

                 Set Field{filteron_off; ""}

                Exit loop if $loopcount = Get(Foundcount]

                 set variable $loopcoung = $loopcount+1

                 Go tlo Record[next]

                EndLoop

                End-if

                Go to layout {whichever one you came from]

                 

                Dont take the code syntax as gospel but the steps are correct

                 

                this will allow the calc to return the correct portal key