vLookup How to add new Child item to existing parent item

Home Forums vLooup for SharePoint vLookup How to add new Child item to existing parent item

Tagged: 

Viewing 7 reply threads
  • Author
    Posts
    • #23497
      Brett
      Participant

        Hi Alexander,

        I’ve got the vLookup working fine from a Parent to create a new Child item, works great.
        But if a user opens a new form directly from the Child list, can they attach it to the existing Parent item, like a reversed vLookup?
        Or would a different plugin work, cascading drop-down perhaps?

        Thanks for your time,
        Brett

      • #23508
        Alexander Bautz
        Keymaster

          If your parent list doesn’t grow over 5000 items you could use a lookup form the child list to the parent list as “connection” for the vLookup. This way you can either add from the parent, or go directly to the child list and select the parent in the normal lookup column.

          Alexander

        • #23513
          Brett
          Participant

            Hi Alexander,

            Not sure what you mean “normal Lookup column” do you mean the default SharePoint Lookup, the SPJS-Lookup or vLookup?
            From the Child item, if I select the Parent, then go back to that Parent item, will it show up as a vLookup Child item?

            Thanks

          • #23526
            Alexander Bautz
            Keymaster

              I mean the standard lookup column. Look at the attached images for a setup example.

              Alexander

            • #23604
              Brett
              Participant

                Hi Alexander,
                I’m staring at your replies above and have no clue what to do in DFFS config. 🙁
                I’ve got the standard Lookup added to the Child list.
                Person opens up New item and can select from drop-down of Parent items but that’s as far as I have got.

                With your images above, is that connection to be configured in the Parent as a new vLookup connection or in the Child vLookup config?
                Are there some instructions I can follow to configure the Child List connection to the Parent?
                Thanks for your time.

              • #23614
                Alexander Bautz
                Keymaster

                  This article describes the standard method of setting up a parent-child connection with vLookup: https://spjsblog.com/vlookup-for-sharepoint/vlookup-setup-example-for-sp-2010-and-2013/

                  If you combine the query from the article with the one in my comment above (use “or” between them) you should have a connection that pulls back both items already created with vLookup from the parent, and the ones created directly in the child with the lookup column connection to the parent.

                  You can also replace the default connection that uses _vLookupID / _vLookupParentID with only the one on the lookup column as long as you pass the parent ID to the lookup column in the child when you create an item from the parent. You would need to edit all existing child items to have the lookup to the parent before you remove the _vLookupID / _vLookupParentID connection.

                  Please note that you cannot use the default lookup column connection if your parent list ever exceeds 5000 items.

                  Alexander

                • #23637
                  Brett
                  Participant

                    Thank you Alexander,
                    That worked perfectly, much appreciate your time and effort on this.

                  • #33619
                    MikeS
                    Participant

                      Alexander,

                      I have a similar requirement as above. I need to preload 5000 Child items in a new list and have each Child auto connect to the corresponding Parent in an existing Parent list (one or more children connect to a single parent). However, the Child to Parent lookup field connection discussed here won’t work for some of the associated fields I need to pull from the Parent into the Child record as these Parent fields are multi-line or choice field formats.

                      After this backfill operation is complete Child records will be added in a normal fashion from the Parent form.

                      Thanks for your help,
                      MikeS

                      • #33633
                        Alexander Bautz
                        Keymaster

                          The “connection” between parent and child in vLookup is based on a matching value in the two lists – this being the ID of the parent found in a lookup field in the child, or a _vLookupID in a single line of text field being found in a _vLookupParentID field in the child. This means your child items need to have a value matching the parent item to make this connection.

                          I’m not sure I understand what you mean by “However, the Child to Parent lookup field connection discussed here won’t work for some of the associated fields I need to pull from the Parent into the Child record as these Parent fields are multi-line or choice field formats.” – if you want to auto-fill a multichoice value from the parent down to each child after setting up this connection as described above you will have to write a custom script to do that.

                          Alternatively you can set up a new reverse vLookup field connection from the child to the parent to show data from the parent in each child, but don’t allow adding new “parents” as this will not make sense.

                          Let me know if you have any questions.

                          Alexander

                    Viewing 7 reply threads
                    • You must be logged in to reply to this topic.