Map checkbox to list field using record producer

brostoff17
Tera Contributor

I have a series of checkbox variables that I want to map to a list field on the table.   Checking the checkbox just returns "true" or "false", so I cant map the fields.   Has anyone done this using an onSubmit script to map the fields?

1 ACCEPTED SOLUTION

I am guessing that your variable names are direct and together. If that is the case, you need to indicate that they are part of the producer form by adding producer. in front of the variable name:



      var wArray = [];


      if (producer.direct == 'true') {


          wArray.push('241aee49db72f2409502f6e9af961944');


      }


      if (producer.together == 'true') {


              wArray.push('562a6e49db72f2409502f6e9af9619d4');


      }


      current.u_product_line = wArray.toString();


View solution in original post

10 REPLIES 10

Hi Chris,



The problem was these records weren't on a table, they were just text choice options! Once I converted it to a string, it worked.



Thanks for your help.



Josh