Add Folder / Add Documents to Folders

Forums vLooup for SharePoint Add Folder / Add Documents to Folders

Viewing 9 reply threads
  • Author
    Posts
    • #18432

      Hi,

      I got following issue. To solve a employee data related issue we have a lookup on documents as following:

      a employee record got a lookup on his documents in a library. to make access restrictions easier each employee got his own folder in a library and within this library I add folders using a workflow and addint the vLookupID to it so the query in the user sheet works.

      The issue now is I cannot use the function of adding documents directly to these folders. If I use the function of adding new folders to the employee record it will create this folder on the root and not within the employee record.

      Is there a way to use the same functions as for the documents (Add new items to this folder (Document libraries only)) for folders as well? meaning new folders get added within a folder.

      an answer as soon as possible is highly appreciated.

      thanks.

    • #18437
      Alexander Bautz
      Keymaster

      Hi,
      Unfortunately I don’t have this built in, but you can use a snippet like this to specify the root folder when the user clicks the “New folder” button (put the code in the Custom JS textarea in DFFS backend):

      spjs.vLookup.initAddNewFolder = function(fin){
          var baseFolder = getFieldValue("_vLookupID").split(":").join("")+"/";
          jQuery("#vLookupNewFolderName_"+fin).css("width","300px").val(baseFolder);
          jQspjs("#vLookupNewFolderWrap_"+fin).toggle();
      }

      Please note that I have replaced the “:” in the _vLookupID with “” to make the folder name valid. I guess you have done something similar when you created the folders in the workflow?

      Let me know how this works out.

      Best regards,
      Alexander

    • #18439

      Hi Alexander,

      thanks for the reply. I am not sure if I explained myself properly.

      Each employee record (list item) get several lookups into different document libraries. I have the option activated if I upload a document it will upload this into a subfolder (as specified in the dffs backend) into the document library.

      when the employee record is saved a sharepoint 2013 workflow is running and creating folder within the employee subfolder including the proper _vLookupParentID.

      now following issue. when I get into the employee record where the lookup onto the documents is I can see all the created folders BUT I cannot add document to these folders using the little icon as always. there is an error “the page you are looking for cannot be found”. I think I found the issue with this.

      When i manually add a folder using the DFFS functions the folder gets created in the root of the document library and gets the _vLookupID with it. even if I create a subfolder this will work and I can also add documents to it using the icon. in this case DFFS is using the upload.aspx file from the root forms folder. If i try to upload a document into a automatically (by the workflow) created folder in the subfolder of the employee it is trying to open the upload.aspx file within the subfolder. Unfortunately the file is not there.

      So the issue is the change in referencing the upload.aspx file.

      Does your code initiate the use always the upload.aspx file in the root folder?

      sorry for my bad description…. I hope I described it somehow well.

      christoph

    • #18441
      Alexander Bautz
      Keymaster

      I think I understand most of what you are trying, but could you email me some screenshots of the vLookup config and the folder structure you have created with the workflow?

      I’ll look at it later tonight and see if I can come up with a solutions.

      Alexander

    • #18452
      Alexander Bautz
      Keymaster

      Please check the updated version and let me know how it works out.

      Alexander

    • #18461

      Hi Alexander,

      this works now perfectly. I have seen you also did some other updates as well. What I found not working anymore for me is the switch between the three forms (display, new and edit). I have the button but when clicking it it does not change.

      Other buttons seem also not working properly. Formerly i was asked if i want to save the form and exit the setup etc. this does not happen anymore on any button. is this on purpose? The save button seems to work but there is no feedback anymore if it was or not.

      thanks.
      Christoph

    • #18464

      I do not know if there is a connection to this but when checking the code i see this error in the console:

      jquery.js:4 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help, check https://xhr.spec.whatwg.org/.
      send @ jquery.js:4

    • #18468
      Alexander Bautz
      Keymaster

      Hi,
      I cannot reproduce your problems with the buttons. Are you sure you have updated all the files in the DFFS package? – maybe you are missing an update on the CSS files?

      You can see the version info in the top of the page in DFFS backend.

      Alexander

    • #18477

      Hi Alexander,

      i checked the version of the CSS uploaded and it was the newest. Nevertheless I uploaded all files again, cleared cache and it did work.

      Maybe my fault with the cache or a typical IT issue 🙂

      thanks.

    • #18482
      Alexander Bautz
      Keymaster

      I’m gland it worked out.

      Alexander

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