expand folder in vlookup table automatically?

Forums vLooup for SharePoint expand folder in vlookup table automatically?

Viewing 2 reply threads
  • Author
    Posts
    • #31916
      Keith Hudson
      Participant

      We are using vlookup between a custom list and a document library to store attached files in the library instead of attaching them to a list. We have the attached files going into a folder that is named using a naming convention that allows us to identify which item on the custom list the folder relates to.

      The vlookup table on the list shows the folder name. When we click on the folder name, the folder opens and shows all the uploaded files. Is there a way to automatically expand the folder in the vlookup table when the custom list form renders?

    • #31919
      Alexander Bautz
      Keymaster

      Hi,
      Drop this in your custom js and it should expand all first level folders:

      function vLookupIsLoadedCallback(fin){
          if(fin === "vLookupDocuments"){
              jQuery("#dffs_"+fin+" .vLookupFolderTable").each(function(i, t){
                  jQuery(t).find("td:first").trigger("click");
              });
          }
      }

      Replace “vLookupDocuments” with the internal name of your vLookup field.

      Alexander

    • #31936
      Keith Hudson
      Participant

      Thank you!! That worked perfectly.

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