Folder button does not create folder in relative List or Library view

Hi, am currently using Forms to create separate storage folders for each project within a 'ProjectDocuments' library.

When a new project is created, I've used some custom code to create a project folder to hold all documents for that project, when saved, the user is then directed to an edit form which dynamically switches the root folder for all library views to the specific folder for that project in a document library (seemed to be a good way to keep separation and works well).

However I've noticed that should the user wish to create a folder inside the project folder, using the current folder button will only create a folder in the root library, which the user then cannot see. Is there a way of switching the behavior of the folder buttons so that folders are created relative to the dynamically set folder? For example:

  1. New project creates folder called 1234 in ProjectDocuments - i.e. 'ProjectDocuments/1234'

  2. Edit form then dynamically switches the root folder to 'ProjectDocuments/1234' for all library views

  3. User clicks on new folder, this should create 'ProjectDocuments/1234/new folder'

At the moment clicking the folder button would create 'ProjectDocuments/new folder' which doesn't make sense, and is not viewable in the project.

Hopefully this is clear, if not please let me know.

Kind regards


Hello @abolam,

I couldn't reproduce the case on my side.

Could you please share the code that you are using to set the Root Folder of the library.

Do you get any errors in the browser console (F12)? Could you please share the screenshot.


I think I've resolved this, we were setting the details on the wrong control! Apologies. Folders are working correctly now.

I have another question relating to the buttons but I will log it separately, Thanks @mnikitina!

1 Like