set vLookupID into editform

Forums vLooup for SharePoint set vLookupID into editform

Viewing 1 reply thread
  • Author
    Posts
    • #27295
      Jon Whisman
      Participant

      Hi,

      I have list (parent list) that is setup with vlookup in the edit form that users access child items from. Both lists (parent and child) are lists that only use the edit form, as the main form content is pre-loaded into the site, then the users edit the required fields to “complete” items.

      My need:

      User EDITS a child vlookup from within the vlookup table in the form and and I want the vLookupID from the parent item to be set into vLookup_ParentID of the editform of the child item that they opened from the vlookup table.

      Alternatively: can I globally update all child vlookup items that are loaded in the table with the vLookupID from the currently open record (parent form item)?

    • #27303
      Alexander Bautz
      Keymaster

      You can try adding this to your PARENT form Custom JS:

      var parent_vLookupID = getFieldValue("_vLookupID");

      And then add this to your CHILD form Custom JS:

      if(window.parent.parent_vLookupID !== undefined){
        setFieldValue("_vLookupParentID",window.parent.parent_vLookupID);
      }

      Let me know how this works out

      Alexander

Viewing 1 reply thread
  • You must be logged in to reply to this topic.