Move document between folders

I have a file sharing system that needs to have the ability to move files from one folder to another. So far I'm using entities (Folder , Document) and Dataviews to display the folders and their content via the Folder_Document relation between these entitites. Any ideas on how to achieve this?
2 answers

Hi Roman,

Hope this would be the solution you are looking for,

1. So I guess in your Dataview with Folder object as the parameter will have a Datagrid that will show the collection of Documents objects associated to the Folder object. (One to Many association from Documents to Folder in Domain Model).

2. Add a DataView adjacent to the above Dataview and set the source to Listen to the Document list Datagrid.

3. Inside this DV drag and drop the Folder attribute like Name or something through Document association. Would generate a drop-down that displays the Folder attribute.
4. Run the app select the Document from Datagrid and  change the Folder from Dropdown on the Dataview. The selected document should now be associated to the selected Folder from drop-down. Don't forget to hit Save in the DV below.

Few tweaks,

Can hide the control bar from the Document DV and add an OnChange MF for the drop-down.

Alternatively add a Move Document action button on Datagrid to trigger a MF which will show a pop-up page with the Document DV containing Folder drop-down. Whichever way you want it.

Let me know if you have any questions. Thanks!



Are you solving your filesharing system fully in Mendix or do you integrate with a filesystem? If your souliton is 100% Mendix it is just a matter of changing the association from the document-object to another object(folder) of the folder entity.  Eg this microflow expects an object of File and the NewFolder and changes the association of the File object to the NewFolder. (But if you are connecting to a filesystem you need a totally different answer :-)