3 Replies Latest reply on Dec 26, 2013 8:20 AM by philmodjunk

    Filtering results in a portal by a field.

    Sketter

      Title

      Filtering results in a portal by a field.

      Post

           Hi,

           So have two tables, Tickets and Houses with a relationship of Houses:HouseID=Tickets:F_Houses

           I have a layout using Table:Houses with a portal for Tickets. Each Ticket record has fields Resolved and Flag as their own checkbox (in hindsight I could have consolidated the two, but i did this so I could keep track of what has been a flagged ticket after it has been resolved).

           So I'm trying to filter out the portal based on the criteria of those two fields.

           So I thought this would have to be done by relationships and this is what I came up with but isn't working.

           Table:Field
           Houses:M_filter (value list of All,Resolved, Flag)
           Tickets:K_Cal   calculation    Case ( Houses::M_filter="All" ; All; Houses::M_Filter="Resolved";Resolved;Houses::M_Filter="Flag";Flag ) 

           Relationship
           Houses:HouseID=Tickets:F_Houses
           AND M_filter=K_Cal

           So am I even in the same ball park here?

           If anyone can help that would be great.

           Thanks.

        • 1. Re: Filtering results in a portal by a field.
          philmodjunk

               Define a Kcal field in Tickets as:

               List ( "All" ; FlagFieldHere ; ResolvedFieldHere )

               And clear the "do not evaluate if all referenced fields are empty" check box.

               Select Text as the result type.

               Define M_Filter as a text field and give it a value list with three values: "All" ; "Resolved" ; "Flag".

          • 2. Re: Filtering results in a portal by a field.
            Sketter

                 Thanks Phil.

                 One more thing, How would i work it in so that it will show Tickets that are still open? (Where there are no resolved status)

                 Do I need to create a field with an open status and just add it to the value list?  Or is there a shorter way?

                  

                 Thanks.

            • 3. Re: Filtering results in a portal by a field.
              philmodjunk

                   It depends on how an "open" status will need to affect what records are listed in the portal and what data in that portal record marks it as a record with an "open" status. If "open" means that the resolved field is empty, this will take an extra bit of work in order to make it happen.