Hello all,
I do have the following scenario:
A portal is used to upload documents. One of those should be an invoice and I need to know which one is it. I cannot ask the uploader to name it properly since this is not going to work consistently.
Is there a way/ work around where I can distinguish the files?
At later stage I will consume the uploaded files with Power Automate where I need to send email and make sure the invoice is always the first attachment.
Please help
When the user will upload the file you can set the file category using another field also on the save button event.
// Form validation for next button or save button
window.webFormClientValidate = function () {
var filePath = $('#AttachFile').val();
//Check the Student attachment required
if(!filePath) {
alert("Please upload file.");
return false;
}
// Set value of the field if required.
return true;
};
Regards
Mohammad
@Atiour, thank you for your reply.
Can you please explain further? I cannot understand properly the solution you are proposing.
Who is going to mark this file category and how it will be done? I assume that all uploaded docs will be pdf.
Thank you in advance. 🙂
When the user will upload a file you need to introduce a file type selection on UI: Invoice or another type.
Based on user selection when the user will save/upload a file. On that javascript event, you can also add/set addition field value using this javascript into the portal.
@Atiour, I see. I will check whether this will work for me. If yes - I will mark your post as accepted to be the proper solution.
Thank you
whenever I want to metadata against a document I change my data model, having a "Documents" entity
For example: Application 1:N Documents, and each Document contains information about the document + attachment
when the user is adding the document you can add a dropdown with document types
Power Apps Portals Super User
Thanks @OliverRodrigues
Is it possible to display a custom field in shareppoint document location file uploading popup?
Let me clear one thing that we are uploading all the documents in sharepoint and we want to diffentiate the each document with custom field.
No, you can't add a custom field if you are using SP integration. But in my opinion the solution is the same, you add the metadata in your Dataverse, and the "Document" record in dataverse will contain the link to SharePoint.
If you need the metadata to be present in SP, you will probably not be able to use OOB SharePoint integration.
Power Apps Portals Super User
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.