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 / YAML Code to Add an At...
Power Apps
Suggested Answer

YAML Code to Add an Attachment Control (no form needed)

(2) ShareShare
ReportReport
Posted on by 37
I've been trying to figure out the YAML code that will always work for the attachment control without having to rely on a form and copy it out of there.

Oddly enough, this doesn't work:
```
- attAttachFiles:
    Control: Attachments
```

I think it needs the "IsInDataCard: =true"

Of course I added in some defaults down below I would want set to save time that ties into the App.Theme.Colors.
If you have something useful like this or are looking for something you haven't found yet, let me know and I'll add it to the "snippets" repo, or I will try to figure it out. 😋👍

Darren Neese 🔗
 

- attAttachFiles:
    Control: Attachments
    Properties:
      AccessibleLabel: ="Upload files here"
      ContentLanguage: =Language()
      MaxAttachmentSize: =50
      MaxAttachments: =10
      Tooltip: ="Upload files here"
      BorderColor: =App.Theme.Colors.Lighter60
      IsInDataCard: =true
      BorderThickness: =3
      Color: =App.Theme.Colors.Darker30
      Fill: =ColorFade(App.Theme.Colors.Lighter80, 70%)
      FocusedBorderThickness: =2
      HoverColor: =Self.Color
      ItemErrorColor: =Color.Red
      PaddingBottom: =10
      PaddingLeft: =10
      PaddingRight: =10
      PaddingTop: =10
      Width: =400
      X: =(Parent.Width - Self.Width) / 2
      Y: =(Parent.Height - Self.Height) / 2
2024-11-23_17-37-27.png
Categories:
I have the same question (0)
  • Suggested answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at
    hey
     
    there is no way to work with attachments without having the attachment control.
     
    how do you want to add the attachment to your app without it?
     
     
    if my answer helped, please mark as verified,
     
     
    cheers
  • L.Koelsch Profile Picture
    3 on at
    As of 6/26/25, this solution works for me if I take out the "IsInDataCard" pair. Power Apps updated about 1-2 weeks ago and has improved this ability for Attachments controls outside of forms.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard