5 Replies Latest reply on May 22, 2013 8:57 AM by philmodjunk

    Portal filter based on two sets of criteria

    Sketter

      Title

      Portal filter based on two sets of criteria

      Post

           Hi,

           So I have a portal that lists a large set of contract records with expiry dates.
           There is a filter to show contracts that have not passed the expire date, I'm using this formula;

           Contracts 2::Contract end date>Get(CurrentDate)

           I also have a check box field for contracts that have been renewed.  When this check box is checked (with a Yes value from the Value List) I also want to have the contract removed from that portal.

           Can anyone help me with what my formula should look like?

           Thanks!

        • 1. Re: Portal filter based on two sets of criteria
          philmodjunk

               How many values does the value list for your check box field have? Just one value for "yes" or more than one such as "yes"; "no"...?

               If you have multiple values in your value list, you should use a radio button field instead of check boxes to make it harder for a user to select more than just the "yes" value. If it is a single value field, howver, then a check box format is the better option.

               As long as you limit the user to a single value when "yes"  is selected, this filter expression may be used:

               Contracts 2::Contract end date>Get(CurrentDate) AND
               Contracts 2::CheckBoxField ≠ "yes"

               But this will fail if your field formatting/validation permits selecting other values in addition to "Yes" in the same field.

          • 2. Re: Portal filter based on two sets of criteria
            Sketter

                                Yes i only have 1 value, which is "Yes" and your formula is working.

                                Thank you!

                  

            • 3. Re: Portal filter based on two sets of criteria
              philmodjunk

                   If the only possible values are "yes" or an empty field, this expression could also be used:

                   Contracts 2::Contract end date>Get(CurrentDate) AND
                   IsEmpty ( Contracts 2::CheckBoxField )

              • 4. Re: Portal filter based on two sets of criteria
                Sketter

                     I have another semi related question.

                     I have created a report that sorts Contracts by Customer names based on a contract table.  (Each customer can have more then one contract, however one will always expire before a new one ca be renewed)

                     When i pull the report i get every contract.  Is there a way to pull this report so only 1 latest contract shows on the report?

                • 5. Re: Portal filter based on two sets of criteria
                  philmodjunk

                       Sounds like your layout should be abased on Customer instead of contract. From Customer, a relationship can be set up that shows the most recent related contract record via a sort order that you specify as part of the relationship.