10 Replies Latest reply on Feb 7, 2017 8:25 AM by Loic.Aigon

    Data Merge reverse lookup

    Mattmcquiff Level 1

      Hi I'm just experimenting with the data merge and it works well. However is there a method to reverse look up, by this I mean.

       

      If the csv file looks like this.

       

      Position, Name, Year started, @picture

      Director 1, Mr Big, 1992,big.jpg

      Managing Director, Ms Bigger, 2012,b.jpg

       

      So I can set up a picture and have it look up the "Managing Director" details?

       

      I think from what I have searched, data merge is limited so is there another program that I should be using?

       

      Many Thanks

        • 1. Re: Data Merge reverse lookup
          vinny38 Level 4

          Hi

          If I understand your request correctly, it is just a matter of ordering your variables (Or am I missing something obvious?)

          merge.jpg

          • 2. Re: Data Merge reverse lookup
            Mattmcquiff Level 1

            Thats one of doing it yes thanks, although could be useful to look up if someone is added they would be added to the bottom of the list. Unless the other person input the data remembers to put it in order.

            • 3. Re: Data Merge reverse lookup
              vinny38 Level 4

              Hmmmm so what you want is that a new entry would be placed at the top of your CSV file, is that right?

              In that case, I would personally create a macro in Excel.

               

              Something like that:

               

                  Dim position As String
                  Dim name As String
                  Dim year As String
                  Dim picture As String
              
                  position = InputBox("Position?", "Add new person")
              
                  name = InputBox("Name?", "Add new person")
              
                  year = InputBox("Year?", "Add new person")
              
                  picture = InputBox("Picture file name (don't forget to add the extension)", "Add new person")
              
              
                  If MsgBox("Do you want to add this person?" & Chr(10) & "Position: " & position & Chr(10) & "Name: " & name & Chr(10) & "Year: " & year & Chr(10) & "picture: " & picture, vbOKCancel) = vbOK Then
                  Rows("2:2").Select
                  Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbovee
                  Range("A2").Value = position
                  Range("B2").Value = name
                  Range("C2").Value = year
                  Range("D2").Value = picture
                  End If
              

               

              Don't forget to update Data source in INDD.

              Thinking... as far as I know, there is no preflight that would warn in case of modified data source. Would be a cool feature...

              • 4. Re: Data Merge reverse lookup
                Mattmcquiff Level 1

                In Fairness I think i might be going about this the wrong way. I think the list side of things is fine, Although what you provided is helpful.

                 

                I was trying to produce a hierarchy tree that could be a web page so and therefore easier to refresh through InDesign? (I think)

                I'm not convinced that I will be able to achieve the layout I expect via InDesign. I'm not sure how to populate something like this.

                Screen Shot 2017-02-07 at 11.49.13.png

                • 5. Re: Data Merge reverse lookup
                  Loic.Aigon Adobe Community Professional

                  The trickiest way of achieving this would be to use inline merge inside a "triangular" frame. Or the "simpliest" would be to script it all.

                  • 6. Re: Data Merge reverse lookup
                    vinny38 Level 4

                    Huh right... I understand better now with a picture. I kind of left the road ^^

                    Now, this is going to be quite tricky, I'm not sure this could be done with data merging in a quite simple way...

                    Maybe Loïc wants to go further in his suggestions... I'd be curious to see how you deal with merging datas in a frame

                    • 7. Re: Data Merge reverse lookup
                      Mattmcquiff Level 1

                      I'm just trying out the script inlineMerge (is thats what you meant). And it partly works. I don't get the dropdown menu when it runs, just an area to type and by default has ^p as an option (new paragraph)Screen Shot 2017-02-07 at 14.53.00.png           . So at the moment I get a line displayed.    

                       

                      Screen Shot 2017-02-07 at 14.55.03.png

                      • 8. Re: Data Merge reverse lookup
                        Loic.Aigon Adobe Community Professional

                        yes that's the idea. I think the dropdown list was removed in order to let every one set the separator of its choice.

                         

                        Capture d’écran 2017-02-07 à 16.27.11.png

                         

                        Here I juste use a space separator and let indesign paragraph composer distribute the items give the available space.

                        1 person found this helpful
                        • 9. Re: Data Merge reverse lookup
                          Mattmcquiff Level 1

                          Sorry I'm so new to this how did you get the paragraph composer to distribute? Did you do it before or after you ran the script?

                          • 10. Re: Data Merge reverse lookup
                            Loic.Aigon Adobe Community Professional

                            Big words to say that I don't really care of positionning items as I let indesign reflow the boxes for me