We have an app where an user(Employee) can submit a form after attaching some documents. When the Manager opens the submitted form, he should be able to Open/View the attachments the Employee has submitted but not delete them. At the same time the Manager should be able to add new attachments while Approving/Rejecting.
Is there any way this can be achieved using the current Submit(EditForm)/Patch options?
So far we have created a Form which will be in DisplayMode.New/Edit an we have a button for Attachments. When the user clicks on this button, an new Form will be shown with attachments field and this form is submitted suing the Submit function(SubmitForm(Attachments)). I am able to Save/Open/Delete the attachments successfully form. If I open the Attachments form in View Mode for the Manager, they are not able to add any Attachments.
I realize this might not have a straight forward solution, but any work-around for this will be greatly appreciated as this is a major requirement for us.
Are you using the SharePoint list as data source? If so, you can create the auto-generated app by selecting File > Create an app > Start witn your data > SharePoint connection. In this app, you will see 3 screens, one for Gallery, one for DisplayForm, and one for EditForm.
In Display Form, all columns are in display mode and cannot be edited. So you can use the DisplayForm to show the attachments.
In Edit Form, there are 2 modes, NewForm and EditForm. You can set below formula on the DisplayMode property of the attachments data card to make this work:
We are using SQL Server as the data source to save the data from the form. Since we dont have an potion to save the attachments to the SQL, we are saving them to a Sharepoint site. So the data on the form will be saved to SQL and the attachments are saved to the Sharepoint list.