vlookup error and children no rendering in parent forms

Forums vLooup for SharePoint vlookup error and children no rendering in parent forms


Viewing 3 reply threads
  • Author
    • #13712
      Paul Lynch

      Hi Alex,

      For some reason my vLookup has a strange bug today. In newform.aspx it appears to open the new child window, I enter the form info and it saves it to my child list. However on the newform.aspx it does not show the child items in a table. It appears as if nothing has been added. When I check the observation list they have gone in ok.

      In Dispform.aspx (I have it set to add new items too) if I click to add a vlookup child item the new child window pops up and I Get this error message (see attachment below).

      Any ideas?


    • #13715
      Paul Lynch

      The error itself did not make sense as the Child List (and Child item has a vLookupParentID field (same internal field name).

      Although I just noticed that this field was set to Hidden in the Child list Item Content Type, I just set it to optional and it is now fixed and not appearing in the form.

      Strange sorry FIXED!

    • #13717
      Paul Lynch

      Although I have no issue now, perhaps I could ask a question on functionality.

      Right now it is working great, I can click the + button to do a vlookup and it will create a new item in the child list and show it in the table on my parent form.

      But what is I wanted to both add new child items, or select from existing ones?
      Would this possible?

      I guess all the code has to do is set the value in the child vLookupParentID column.

      This lookup would be overwritten if two parents tried to associate with a single child. So only one distinct child item could be associated with one parent item, or perhaps if the vLookupParentID accepted multiple values, it could then associate with different parent items?

    • #13742
      Alexander Bautz

      I’m glad you figured out your initial problem.

      When creating new children from NewForm, the only option to link it to the NewForm is with the _vLookupParentID as the new item doesn’t yet have an ID.

      What you could do is to use a custom CAML in the vLookup setup that checks if either the [currentItem:_vLookupID] = _vLookupParentID OR [currentItem:ID] = “MultiLookupColumn in child looking at parent list”.

      Let me know if this makes sense.


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