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

Notifications

Announcements

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:
I have the same question (0)
  • 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard