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:
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.
I know I am close - I just need to make it work together.
Still having issues if anyone can help
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
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
MS.Ragavendar
32
Rajkumar_M
16
Super User 2025 Season 1
mmbr1606
16
Super User 2025 Season 1