9 Replies Latest reply on Mar 29, 2012 6:52 AM by ctgizmo

    Data Merge checkboxes & radio buttons

    ctgizmo Level 1

      I'm using InDesign data merge to merge employee data from an Excel csv file to InDesign. The text import is no problem but am stumped with marking the checkbox/radio button fields from the csv file (like 1 = Female, 2 = Male, if 2 then ckBoxM1 = on). How does this work? Thank you for your help.

        • 1. Re: Data Merge checkboxes & radio buttons
          John Hawkinson Level 5

          You cannot do this directly with Data Merge.

          Data Merge can merge text fields and images, and that is it.

           

          So what can you do?

          Basically you need to use scripting.

           

          You can, for instance, merge your checkbox field into a textframe on the pasteboard, and then write a short script to run through your document and set each associated checkbox based on its corresponding textframe's contents.

           

          I'm rusty enough on radio buttons that I'm not going to give you an example now, since I don't have a ready-to-go radio button example. Post a screenshot of how you have the radiobutton setup (Is it a multi-state object?)?

          (This is probably better posted in the Scripting forum, but we'll help you here until/unless we get stuck...)

          • 2. Re: Data Merge checkboxes & radio buttons
            ctgizmo Level 1

            John,

            Thanks. I moved this to the scripting forum.

            • 3. Re: Data Merge checkboxes & radio buttons
              Jeffrey_Smith Most Valuable Participant

              You are not looking to create a radio button in Indesign, correct?

               

              Unclear on what you ultimately want to create. But it sounds something like this: web based form (containing checkboxes and radio buttons) > employees enter responses > data is compiled > csv file is exported > you need to create an indivdual report of responses (and would like to accomplish via datamerge). The form field for gender is a radio button and "1 = Female, 2 = Male, if 2 then ckBoxM1 = on" and this is how the data is written into the CSV file, and you would simply like for your report "male".

               

              If my description is closer to your goal, then you are looking at datamerge in Indesign while tweaking csv file, and would be served in this forum. But, if the objective is creating a radio button, then scripting forums and other resources would better suited.

              • 4. Re: Data Merge checkboxes & radio buttons
                ctgizmo Level 1

                Jeffrey,

                 

                To clarify, I am importing csv data to an InDesign document. The csv data is generic employee data (name, dob, gender...). The InDesign doc has corresponding text fields but checkmark fields for gender (Female or Male) and language (English / Spanish). If the gender value in the csv file is "M" then I want the corresponding checkbox to be checked. I'm familiar with LiveCycle but the InDesign data merge feature seem easier for importing data except for this checkbox issue. I am also considering the $135 evermap mail-merge plug-in which may further expedite the process. Thanks for your help. 

                • 5. Re: Data Merge checkboxes & radio buttons
                  John Hawkinson Level 5

                  Thanks. I moved this to the scripting forum.

                  Unfortunately posting a duplicate of the question there may have done more harm than good. But let's move it there now that you've started to:

                  Data Merge checkboxes.

                  • 6. Re: Data Merge checkboxes & radio buttons
                    Jeffrey_Smith Most Valuable Participant

                    This is something you could do with Indesign + datamerge. Keep in mind, Indesign datamerge does not have intelligence. But you can modify your csv data file to accomodate the appropriate placement of your variables for the datamerge. In the scenario of check boxes for gender, the csv file most likely is one column in the spreadsheet with either M or F for each employee. You would need to modify this by creating two columns in the spreadsheet, one for male, one for female and which reports only the appropriate gender:

                     

                    Employee
                    Male
                    Female
                    John SmithM
                    Mary Brown
                    F
                    Tom WilliamsM

                     

                    For the datamerge, you would need to have one variable placeholder over each checkbox [ ] Male  [ ] Female. The merge will only place a indicator into the checkbox variable placeholder if is present, and nothing if an indicator is not present. For first record, [x] Male  [ ] Female

                    1 person found this helpful
                    • 7. Re: Data Merge checkboxes & radio buttons
                      Peter Spier Most Valuable Participant (Moderator)

                      While Jeffrey's sample shows M & F in those fields, you can have any glyph or string you want (including dingbats by uing the correct alphabetic key and asigning a character style that changes the font to the dingbat font).

                      1 person found this helpful
                      • 8. Re: Data Merge checkboxes & radio buttons
                        Colin Flashman Adobe Community Professional

                        other posters have effectively provided the same answer I would give, but I will give my answer anyway to reinforce the point.

                         

                        InDesign's data merge function simply places text from a database into positions determined by where the fieldname placeholders have been placed in InDesign. Apart from determining whether the input is type or a picture, or using GREP styles, InDesign cannot parse the information - that is, it doesn't know if the information is a date, dollar value, needs to trigger something else on the page, etc.

                         

                        However, Excel CAN parse information and I recommend using Excel as the "horsepower" behind any datamerge... that is, let it parse the information with formulas and cell formatting, then export the file as a csv and place the file. Not to take people away from these threads, but I have a blog which features heavily on going beyond the basics of data merge in indesign. if interested, go to http://colecandoo.wordpress.com/category/vdp/

                        1 person found this helpful
                        • 9. Re: Data Merge checkboxes & radio buttons
                          ctgizmo Level 1

                          To All,

                           

                          Thanks for the help. I ended up using the plugin and doing it in LiveCycle.