6 Replies Latest reply on Dec 5, 2013 7:03 AM by disabled_JohnWolff

    Portal filter

    robby@brays.net

      Ok,

      Now I have a portal set up to filter all records with todays date, how do I add 1 or 2 more variables in a string that have to be met.

      thanks

        • 1. Re: Portal filter
          Mike_Mitchell

          The portal filter calculation is a Boolean (either true or false). So, if you need more than one condition to be true, you'd string the conditions together using "and".

           

          Example:

           

          relatedTable::dateField = Get ( CurrentDate ) and relatedTable::createID = Get ( AccountName )

           

          Does that answer the question?

           

          Mike

          • 2. Re: Portal filter
            Stephen Huston

            Portal Filtering is handled via a calculation assigned in the portal setup dialog, so I assume you have something like:

             

                 MyRecordDateField = Get (currentDate)

             

            You can add condtions to that such as:

             

                     MyRecordDateField = Get (currentDate)  AND  MyRecordNumberField > 5  AND  othertesthere

             

            The sequence of AND conditions will return true only if all are true. You can also use NOT and OR tests, but, if you want some of them combined to create a separate test with 2 parts OR some other test, use () around the parts you want evaluated as a single test. For instance:

             

                 field1 = "x" OR ( field1 = "y" AND isEmpty (field2) )

            • 3. Re: Portal filter
              beverly

              Mike and Stephen are spot on. You can use any of the operators:

               

                   AND, OR, NOT

               

              You can also use parens if that helps clarify the meaning:

               

                   ( ( x = 7 AND y=8 ) OR z=-3 )

               

              HTH,

              Beverly

              • 4. Re: Portal filter
                robby@brays.net

                Ok Thanks.  For some reason I am having a difficult time stringing the OR function.   Also, is there a certain way the "NOT" is used.

                 

                Thnx

                • 5. Re: Portal filter
                  Mike_Mitchell

                  NOT inverts the result. If the result was true, NOT makes it false, and vice versa.

                   

                  Can you provide your example calculation so maybe we can provide more specific help?

                  • 6. Re: Portal filter

                    Hi Robby,

                     

                    What Mike said.

                     

                    You might need to Google De Morgan's Laws for a full explanation.

                     

                    From Wikipedia:-

                     

                    "not (A and B)" is the same as "(not A) or (not B)"


                    and also,

                     

                     

                    "not (A or B)" is the same as "(not A) and (not B)"

                     

                    I hope this helps,

                     

                    John