2 Replies Latest reply on Feb 26, 2013 9:21 AM by jb362

    Missing function?



      Missing function?



           Is there a function which allows one to check through a list for the presence of a match?

           For example the syntax would be something along the line of…

           $choice = blue

           $bingo = Present($choice; red ; blue ; green ; yellow ; orange ; gray)

           $bingo would return true in this case because blue is found within the list while $bingo would return false since white is not.


        • 1. Re: Missing function?

               Not Isempty ( FilterValues ( List ( "red" ; "blue" ; "green" ; "yellow" ; "orange" ; "gray" ) ; $choice ) )

               will be true if the values in $Choice also exist in the listed values.

               Note that the list of values I have created using the list function can be created in a number of different ways. ValueList items can produce such a list, listing all the values in a defined value list. A text field formatted with checkboxes can be used in place of the list function and then you are checking $choice against the list of values selected in that check box field.

          • 2. Re: Missing function?

                 Thanks Phil for your insight and for the flexibility of your examples.