2 Replies Latest reply on Jun 24, 2014 12:42 PM by Jesse_1

    Checkbox set needs to output a different value



      Checkbox set needs to output a different value


           I am creating a French version of an already English form.  At the beginning the user will be able to click French or English and navigate through the form.  I have two pages that allow the user to select multiple answers (checkbox set).  These answers are coming from a value list that is written in English (they need to stay in English so the client receives the same answers).  I can downsize the field to just show the checkbox’s and not the words.  Then just add a button with the French wording that when clicked marks the checkbox (we need to allow users to click the box or the word to select an answer).  Well, the issue with this is when a user clicks the word instead of the checkbox, it will erase any previous answer (only allows one answer).  To fix this,  I wrote a small script that allowed a customer to select the word and the checkbox.  Then another issue arose, it allows the user to input same answer as many times as the word is tapped. 

           So, I  either need a  removing duplicate values script or a script that can change values from the French wording to English. (i.e. Autres = Other).

           I am using FileMaker Pro Advanced 13

           Does anyone have any ideas?  Any help is appreciated.

        • 1. Re: Checkbox set needs to output a different value

               This script will add a specified value passed to the script as a script parameter (so one button can be used for all check boxes) without selecting the value more than once or overwriting existing values:

               Set Variable [$Response ; value: Get ( ScriptParameter ) ]
               IF [ IsEmpty ( FilterValues ( YourTable::YourCheckboxFieldHere ; $Response ) ) // value has not been previously selected ]
                   #Append newly selected value to existing values
                   Set Field [ YourTable::YourCheckboxFieldHere ; List ( YourTable::YourChekboxFIeldHere ; $Response ) ]
                   #Delete value from list of values
                   Set Variable [$Values ; value: Substitute ( ¶ & YourTable::YourCheckboxFieldHere & ¶ ; ¶ & $Response & ¶ ; ¶ ) ]
                   Set Field [ YourTable::YourcheckboxFieldHere ; Middle ( $Values ; 2 ; Length ( $Values ) - 2 ) ]
               End If

          • 2. Re: Checkbox set needs to output a different value


                 Thank you. this is exactly what I needed.  This is my first post here and I didn't think I would get such a fast and accurate response.  I really do appreciate it, I have been working on this for a few days now.