cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dvoinikat
Helper II
Helper II

Categorize a file during upload in Portal

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

7 REPLIES 7
Atiour
Helper II
Helper II

@dvoinikat 

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. 🙂

Atiour
Helper II
Helper II

@dvoinikat 

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

OliverRodrigues
Super User
Super User

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




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Pages Super User | MVP


Oliver Rodrigues


 

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.

OliverRodrigues
Super User
Super User

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.




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Pages Super User | MVP


Oliver Rodrigues


 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (2,697)