5 Replies Latest reply on Jan 6, 2012 9:29 AM by philmodjunk

    CHECK BOX SCRIPT

    RobertA

      Title

      CHECK BOX SCRIPT

      Post

      Hey guys!

      i have a quick question!

      I am attempting to run a simple find script that will find all selected checkbox items within a layout.

      the thing is, i was able to get one script to work, but when i copy and use this script for another check box, it dosnet work! (This is the exact same script with the appropriate feilds replaced to match the new check box, but everything else is the same!!! why is this happeneing?

      here is the script: (this works, but only for one checkbox!)

      Go to layout ["campus containers" (waste tags)]

      Enter Find mode[]

      Ser feild [Wate tags:: All Around; ValueListItems ( Waste tags::All Around ; "All Around")]

      Perform Find [Waste tags:: All Around = "All around"]

      Sort Records [Restore; no dialog]

      Go to layout ["pick up tags" (Waste tags)]

      Enter Browse mode []

       

      PLEASE HELP!!! THIS DOSENT MAKE SENSE!!

        • 1. Re: CHECK BOX SCRIPT
          davidanders

          I assume the misspellings are in your post, not your script?

          Ser feild [Wate tags

          • 2. Re: CHECK BOX SCRIPT
            RobertA

            yes, they are a mistake copying the script from filemaker, all spaces quotations etc. are correct in the script...

             

            thank you!

            • 3. Re: CHECK BOX SCRIPT
              philmodjunk

              ValueListItems ( Waste tags::All Around ; "All Around")]

              Is not correct.

              The syntax:

              ValueListItems ( "filenameofFilewhereValueListIsDefinedInQuotes" ; "ValueListNameInQuotes")]

              To keep file name changes from breaking this function, it's best to use:

              ValueListItems ( Get ( FileName )  ; "ValueListNameInQuotes")]

              • 4. Re: CHECK BOX SCRIPT
                RobertA

                Hello!

                Thank you all for the promp responses!

                The Waste tags::All Around = where value list is defined (layout is waste tags, and the field is all around)

                All Around = name of value list

                when i use the get (filename) function, it throws an error...stating that it cant find filename "all around"

                i have also atempted the getfield(data) function which also dosent work...but this still dosent answer my first question...if my script works for one check box, why cant I copy my functioning script and apply it to the other check boxs?  I can do this very easily using the find function, but i work with computer illeterate individuals and need to make this a EASY as possible....so i am atempting to creat a button linked to a script that does the find fucntion for me...seems simple enough.  unless i am mis-understanding "filenameoffilewherevaluelistisdefinedinquotes" this still doesnt make sense to me...

                 

                thank you all again for your help and resposnes!

                • 5. Re: CHECK BOX SCRIPT
                  philmodjunk

                  The first parameter of ValueListItems must be the name of your database file where the value list is defined.

                  Use exactly what I posted, Get ( FileName ) for the first parameter or put the current name of your file there in quotes.

                  You can look up this function in FileMaker help if you want to see other examples of correct usage of this function.