2 Replies Latest reply on Oct 11, 2013 8:41 AM by TimothyGales

    custom valuelist in calculations



      custom valuelist in calculations


           Hi all,

           I am trying to write a script that uses a custom made valuelist with three items.  They appear as check boxes allowing someone to chose more than one.  The values are "video", "photography" and "digital".  If only one is chosen, my script works fine.  but when more than one is chosen the script doesn't work.  How do I get the script to perform each If statement even if the valuelist equals "video" and "digital"?

           I am defining it like:

           if[project_needs = "video"]

           Perform script


           if[project_needs = "photography"]

           Perform Script

           End If

           If[project_needs = "digital"]

           Perform Script

           End If


           Thanks for any help


        • 1. Re: custom valuelist in calculations

               I suggest making a copy of your check box formatted field, changing the copy's format back to Edit box and then placing it next to the original copy of the field. Then try clicking different check boxes and in different orders while watching the edit box copy to see what data is actually being added or deleted from the field. It can be a major eye opener.

               Use FilterValues to determine if a particular check box has been selected or not in your field:

               IF [ Not IsEmpty ( FIlterValues ( YourTable::project_needs ; "video" ) ) // video box is checked ]

               the functions I have used may be looked up in FileMaker Help if they are unfamiliar.

          • 2. Re: custom valuelist in calculations

                 PhilModjunk,  Thank you.  You are right.  Changing the check box to edit box shows how each value can be list in different orders.  Thanks for the tip.  

                 The IF statement worked wonderfully thanks.