1 Reply Latest reply on Oct 4, 2016 8:01 AM by philmodjunk

    Checking a checkbox?


      I've downloaded and installed the very cool BaseElements plug-in in my Mac's FM folder. And, I've put into script its "BE_FileExists" feature. So, I'm looking for a file's existence in a particular directory on a distant server. So, now I need to have that script put a check mark into my checkbox field, if the file is there. Can someone tell me how to do that? Do I need some "if" functionality in a script, or, is there something built-in I can use in FM?




        • 1. Re: Checking a checkbox?

          it depends on the value list. If there is only one check box, all you need is to use set field to set the field to the value of the single value value list. If you have multiple check box values and want to select one check box with multiple values and you want to select one box without clearing the others, you then need to check to see if the value is already selected before appending it to the list of selected values.


          Set field [ table::checkboxfield ;

          if ( is empty ( filtervalues ( table::checkboxfield; "newvaluehere" ) ); list ( table::checkboxfield ; "newvaluehere" ) ; table::checkboxfiel ) ]