Skip to main content

Notifications

Power Apps - Building Power Apps
Suggested answer

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

Posted on 23 Nov 2024 23:17:11 by 35
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
  • Suggested answer
    mmbr1606 Profile Picture
    mmbr1606 9,936 on 25 Nov 2024 at 07:18:20
    YAML Code to Add an Attachment Control (no form needed)
    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

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,246

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,884

Leaderboard