microsoft / microsoft/PowerPlatformConnectors
[FEATURE REQUEST] Add Attachment Data Card and Enhance Patch Function to Handle Attachments in Power Apps
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.3k
- Forks
- 1.5k
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 11
Description
Type of Connector
Certified Connector
Name of Connector
Function Patch
Is your feature request related to a problem? Please describe.
Attaching a file and uploading this data in Power Apps is currently a cumbersome process with two main workarounds:
-
Using Power Automate:
- Create a form to access the attachment data card, copy it, and paste it outside the form, then delete the form.
- Use the Patch function to create a new record and store the ID in a variable.
- Call a Power Automate flow, passing the file in a document variable and referencing the ID to store the attachment in the correct list item.
For example:
Set(VarID;
Patch(List;
Defaults(List);
{
Name: Mateus;
Age: 18
}
).ID);;
Upload_PDF.Run(VarID;{file:{contentBytes:First(DataCard1.Attachments).Value;name: First(PDF.Attachments).Name}}) -
Without Using Power Automate:
- Create a form and keep only the attachment data card.
- Use the Patch function to create a new record, then use Form.Updates to handle the attachment upload directly.
For example:
-
Create a Form (Name: Form1)
-
Put the list in Item
-
I only leave the data card attachment.
-
Make the normal Patch and place Form1.Updates at the end
Patch(List;
Defaults(List);
{
Name: Mateus;
Age: 18
};
Form1.Updates
)
Both methods are complex and involve unnecessary steps.
Describe the solution you'd like
Suggested Improvement:
-
Develop a standalone attachment data card that can be added directly to a data entry form without needing to copy from an edit form.
-
Adapt the Patch function to handle attachments directly from this data card, eliminating the need for Power Automate in simple scenarios. For example:
PowerApps
Patch(
Lista,
Default(Lista),
{
Nome: "Mateus",
Idade: 20,
Sexo: "Masculino"
},
NewDataCard.Attachments
)
Instead of referencing the ".updates" form, simply enter the NewDataCard.attachamments data input and the patch will create the file with the appended content and the appended file name
Describe alternatives you've considered
Currently, I need to create an edit form, copy the default attachment data card, and paste it on a blank page, then delete the form because it’s the only way to get this data card. Alternatively, I create a form, keep only the attachment data card, and use Form.Updates at the end of the Patch function.
Additional context
Benefits:
- Simplifies the process of attaching and uploading files.
- Reduces the need for additional Power Automate flows.
- Enhances user experience by providing a more integrated solution.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not identify repository files, tests, or implementation entry points. Start by locating the connector implementation for the Patch function and attachment data cards, then define and validate the standalone data-card behavior and direct attachment handling described here.
Written by the indexing model from the issue text.
Assessment
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100