Related docs as typed attachments

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
User avatar
alexey.babin
Posts: 8
Joined: Wed Mar 15, 2017

14 Aug 2017

Hello,

I have to give to users the possibility to store in SP some kind of requests. To the every request can be attached different files as attachments, but every attachment should have the property, that differs - what exactly it is (a.e. invoice, or list of participates or anything else - I've got the full list of attachments types). According to these properties the workflow in future will run.

I think this is the exact use case for related documents functionality. I think I can store the related document in the appropriate folder in the doc library. This folder could be named by guid that is generated when the new (parent) item form opens (and is stored in item`s folder). When the user drags-and-drop files to the control, client-side code checks weightier such folder exists and if not - creates it in doc library, and then moves the newly attached items to the folder. For a sure I could utilize the updateDroppedDocuments to set the attachments type (ask the user, as example, in dialogBox).

So on the view/edit form I can generate the appropriate caml query. The first my question is - am I able to change the "View" property of control dynamically?

Not everyone loves to drag-and-drop files, someone prefers to add files with the “Create new document” button. In this case, as far as I see, I cannot use the updateDroppedDocuments method. When user pushes this button the new dialog appears, and user have to choose the file (from computer) and the folder. After this, the form opens for additional files. So my question is: how can I customize these forms and pass there the field values from parent`s form?

Alternatively, I considered storing these files as exact attachments to parent item; and adding the text field to store full description in json format; and utilize knockout library to provide the ui/ux – but it will be more complex solution with poorer ui/ux, than native sharepoint could give.

So I need a piece of advice.
Thank you in advance!

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

14 Aug 2017

Hello, Alexey!
The first my question is - am I able to change the "View" property of control dynamically?
We are using standard client side view to render Related Items. So you can look at Microsoft documentation to possibly figure out a way to update it dynamically.
After this, the form opens for additional files. So my question is: how can I customize these forms and pass there the field values from parent`s form?
Sadly, upload forms cannot be changed. You can only change Edit Form, also known as Properties of the Document.
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests