web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Upload a file to teams...
Power Apps
Unanswered

Upload a file to teams folder.

(1) ShareShare
ReportReport
Posted on by 19

I am currently building a power app to upload receipts for a company credit card into a teams folder. Here are my wishes for the app

1. Each employee has their own folder - is there a way to choose which folder the attachment goes to? 

2. I have figured out the patch function for everything BUT the attachment. 

3. I also wrote a power automate function that WILL do everything I need, including renaming the file into the correct format. 

4. I am not sure if there's a way to use the power automate function with the data from the fields in the app. 

 

Here's what I have so far: 

mdchris_0-1691509784281.png

 

With the patch function on the button

Patch(PCardFolder, Defaults(PCardFolder)

 

{   Title:"Default",

    Employee_Name:EmNameInput.Text,

    Vendor:VendorNameInput.Text,

    Purchase_Date:Value(DatePicker1.SelectedDate),

    Purchase_Amount:Value(PurchaseAmountInput.Text),

    Attachment:Value(FileAttachment.updates)

    }

);

 

PcardFolder.run

 

Reset(EmNameInput);

Reset(VendorNameInput);

Reset(PurchaseAmountInput);

Reset(DatePicker1);

Reset(FileAttachment);

Navigate(Confirm)

 

and here's what I have for the power automate. 

mdchris_1-1691509872586.png

 

I know I am close - I just need to make it work together. 

 

Categories:
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @mdchris 

    i assume its just a typo in the post, but PcardFolder.run is not correct, Run must be capitalized, and arguments should be passed into Run matching parameters declared in the Flow.

    So in case that's what you actually have, change it to something like below.

     

    PcardFlow.Run(
     EmNameInput.Text,
     VendorNameInput.Text,
     Value(DatePicker1.SelectedDate),
     Value(PurchaseAmountInput.Text),
     FileAttachmentDataCard.Attachments // you may need to change this to something else
    )
    
    //replace the above example with working values

     If PCardFolder is the name of your Flow, it should not have Patch used, and if PCardFolder is not the name of your Flow, it should not have Run called on it, something like name of the Flow (suppose PcardFlow for example) should be what has Run called on it.

     

    See if it helps @mdchris 

  • mdchris Profile Picture
    19 on at

    Have adjusted to the following code: 

    Patch('PCard List', Defaults('PCard List'))
    { Title:"Default",
    Employee_Name:EmNameInput.Text,
    Vendor:VendorNameInput.Text,
    Purchase_Date:Value(DatePicker1.SelectedDate),
    Purchase_Amount:Value(PurchaseAmountInput.Text),
    Attachment:Value(FileAttachment.updates)
    }
    ;
    PcardFlow.Run(
    EmNameInput.Text,
    VendorNameInput.Text,
    Value(DatePicker1.SelectedDate),
    Value(PurchaseAmountInput.Text),
    FileAttachmentDataCard.Attachments)
    ;
    Reset(EmNameInput);
    Reset(VendorNameInput);
    Reset(PurchaseAmountInput);
    Reset(DatePicker1);
    Reset(FileAttachment);
    Navigate(Confirm)

     

    Getting the error "Unexpected Characters:

  • mdchris Profile Picture
    19 on at

    Still having issues if anyone can help

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard