vLookup Default Folder Structure

Home Forums vLooup for SharePoint vLookup Default Folder Structure

Viewing 3 reply threads
  • Author
    Posts
    • #34408
      Claude Cassidy
      Participant

        When using the “Add items to this folder” option in the vLookup Config, I noticed that if I use [currentItem:FieldInternalName] as the root folder, I cannot create any sub folders inside that root folder. For example, if I use [currentItem:Title]/Legal Documents neither the Root folder or the subfolder get created. However if I use Company/Legal Documents it creates the folder and sub folder. Is there a way I can use a currentitem:FieldInternalName and setup a sub folder automatically?

      • #34410
        Alexander Bautz
        Keymaster

          You can try defining a variable in your Custom JS like this:

          var vLookupFolderName = getFieldValue("Title") + "/Legal Documents";

          Now use this in the Add new items to this folder field:

          {var:vLookupFolderName}

          Alexander

        • #34415
          Claude Cassidy
          Participant

            Hi Alexander. Thanks so much for the fast reply. Okay so I created a variable using the custom JS tab as per your reply above, however it seems the Var is not being captured, when using the the {var:vLookupFolderName} in the “Add new items to this folder” and trying the vLookup, it shows the following error when trying to upload a document.

            The file or folder name “Credit App Legal Documents//Legal Documents/Test Document.pdf contains invalid characters. Please use a different name. Common invalid characters include the following: # % & * : < > ? / { | }

            It seems that the space between the two // is what is causing the issue, as that’s where the variable is supposed to be adding the “Title” name. I have tested the variable by setting a rule to set a field to {var:vLookupFolderName} when Title is changed and it only shows the last part which is /legal documents and not what the field Title has been set to. Any idea what could be causing this at all?

            • #34428
              Alexander Bautz
              Keymaster

                Hi,
                Sorry, but I checked and adding a rootfolder/subfolder combination won’t work here if the rootfolder doesn’t already exist. Also, the [currentitem:fin] will pull in the value when the vLookup field is rendered and it won’t update if you change the field.

                I can look into changing this, but if you need to create a predefined set of folders it can be done using custom js so if you can give me some more details I can write a snippet to create these folders.

                Alexander

            • #34439
              Claude Cassidy
              Participant

                Hi Alexander. Not a problem, thanks again for all the help. when you mentioned that the rootfolder needed to be created first, I created a workflow that adds a rootfolder, based off of the Registration Number field, to the document library, then on the editform I adjusted the vlookup “add new item to this folder” to point to [currentItem:RegistrationNumber]/Legal Documents and all is working well now. Thanks a million for all the help, it is greatly appreciated.

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