2 Replies Latest reply on Apr 15, 2009 3:19 AM by northshots

    Transferring Data into a Checkbox Set



      Transferring Data into a Checkbox Set


      Hello, I'm new to FileMaker and I'm just trying to get my head around one or two things whilst importing data from an Excel spreadsheet.


      On the spreadsheet were four columns specifying which mailing list a contact was subscribed to.  A "1" was entered into the appropriate field to indicate that a contact was subscribed to a particular mailing list.  In my new FileMaker database a Checkbox Set seems to be a much better way of holding this data, however I currently have the imported data in separate fields which I somehow need to transfer into my new Checkbox Set which has the option of the four mailing lists.


      The problem is I have over 3000 subscribers and don't really relish the thought of having to click a checkbox for each one.  Is there some way (perhaps a script?) that I specify that if a field has a "1" in it then a checkbox should be checked? 


      Sorry if I haven't made myself clear, please just ask! 

        • 1. Re: Transferring Data into a Checkbox Set

          You can use Replace Field Contents to fix this.


          Let's assume that you want the text "subscribed" to show next to a checkbox in your field and let's call this field "Subscription" and it's in a table called "Imported".

          Let's further assume that your field with a 1 in it is in the same table and named "SubNumber".

          Select a layout that displays the records from your imported table and your Subscription field. Don't format it as a check box just yet.

          Select Records | Show All Records

          Click in the Subscription Field

          Select Records | Replace Field Contents...

          Click the "Replace with calculated result" radio button.

          Enter the following calculation:


          If(Imported::SubNumber = 1,"subscribed","" )


          Click OK

          Click Replace


          Now format your field to be a check box field with the single value "Subscribed" and you are done.

          • 2. Re: Transferring Data into a Checkbox Set

            Thanks, that's great.  I was trying to transfer the data into a checkbox set with four values, however this way I've just made four fields each with a single value checkbox which seems to work just as well.  Thanks again.