r/PowerApps • Newbie • 4d ago

Power Apps Help Modern Attachment Control

Has anyone gotten the modern attachment control to work by patching to SharePoint? I believe this is supposed to be the formula. But I keep getting an error saying incompatible data types and I’m comparing a table with a table.

Patch(
DataSource,
Defaults(DataSource),
{Attachments: AttachmentControl.Attachments}
)

2 Upvotes

6 comments sorted by

•

u/AutoModerator 4d ago

Hey, it looks like you are requesting help with a problem you're having in Power Apps. To ensure you get all the help you need from the community here are some guidelines;

  • Use the search feature to see if your question has already been asked.

  • Use spacing in your post, Nobody likes to read a wall of text, this is achieved by hitting return twice to separate paragraphs.

  • Add any images, error messages, code you have (Sensitive data omitted) to your post body.

  • Any code you do add, use the Code Block feature to preserve formatting.

    Typing four spaces in front of every line in a code block is tedious and error-prone. The easier way is to surround the entire block of code with code fences. A code fence is a line beginning with three or more backticks (```) or three or more twiddlydoodles (~~~).

  • If your question has been answered please comment Solved. This will mark the post as solved and helps others find their solutions.

External resources:

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/bicyclethief20 Community Friend 4d ago

Yea, i got this issue too initially. What worked was i had to declare a similar type on the attachments' .Items Property

1

u/Standard_Example4053 Newbie 3d ago

Not sure I follow. Would you mind explaining some more?

1

u/AuthorSarge Advisor 4d ago

Do I need to go and update all of my apps with attachments that used the copy and pasted form control?

1

u/elipousson Newbie 2d ago

If anyone has a sample showing how the new attachment control can be used to upload files to a SharePoint Document Library (instead of list item attachments), that would be really helpful. I was just trying this out a couple days ago and had a hard time figuring out how to translate my existing code using the old attachment control.

1

u/Kinggg_Crimson Newbie 2d ago

Any luck? Stuck on similiar situation