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 / Power Apps attachment ...
Power Apps
Suggested Answer

Power Apps attachment formula works by default but not when I try to add it into container

(1) ShareShare
ReportReport
Posted on by 133
hi everyone,
 
i am facing an issue in power app where my attachment display logic works when im using the classic "edit form" but not when i try to customise the form.
 
This is what I have in the default classic edit form vs the one i put it in container
 
  Form2 My customise form
DataSource
MAS56Attachments
MAS56Attachments
DefaultMode
FormMode.Edit
//If(IsBlank(varAttachmentRecord.ID)||IsBlank(LookUp(MAS56Attachments,MAS56ID.ID=varMasterData.ID)),FormMode.New,FormMode.Edit)
FormMode.Edit
Item
First(
    SortByColumns(
        Filter(
            MAS56Attachments,
            MAS56ID.ID = varMasterData.ID
        ),
        "modifiedon",
        SortOrder.Descending
    )
)
First(
    SortByColumns(
        Filter(
            MAS56Attachments,
            MAS56ID.ID = varMasterData.ID
        ),
        "modifiedon",
        SortOrder.Descending
    )
)
 
  Attachment_DataCard2 Attachment_DataCard3 (my customised form)
DataField
"cr437_attachment"
"cr437_attachment"
Default
If(!IsBlank(ThisItem.Attachment.FileName), Table({DisplayName: ThisItem.Attachment.FileName, Value: ThisItem.Attachment.Value}), Blank())
If(!IsBlank(ThisItem.Attachment.FileName), Table({DisplayName: ThisItem.Attachment.FileName, Value: ThisItem.Attachment.Value}), Blank())
Displayname
DataSourceInfo([@MAS56Attachments],DataSourceInfo.DisplayName,'cr437_attachment')
DataSourceInfo([@MAS56Attachments],DataSourceInfo.DisplayName,'cr437_attachment')
 
  Datacardvalue10 Datacardvalue12 (my customised form)
Default
Parent.Default
Attachment_DataCard3.Default
 
as u can see, the formula is the same but the result in the screenshot below is different

as the one at the bottom (my customised form) should show "Trip to New.." but it is not showing.
 
Please advise
Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    2,647 on at
    The most likely cause is that the customized attachment control has lost its original form/DataCard binding context, causing ThisItem.Attachment or
     
    Parent.Default to evaluate differently at runtime.
     
    If the attachment control was manually recreated, the easiest and most reliable approach is often:
    • Delete the customized attachment card.
    • Re-add the attachment field from the form's field list.
    • Unlock the card only if necessary.
    • Apply styling and layout changes while keeping the original DataCard structure intact.
    Attachment controls are one of the few Power Apps controls that are highly dependent on the form and DataCard hierarchy.
  • Suggested answer
    Kalathiya Profile Picture
    2,318 Super User 2026 Season 1 on at

    Looks like you need to set the attachment control's Items property instead of the Default property. It seems the Items property is not configured correctly, that's why the existing attachments are not showing up.

    Attachment control expects the existing attachments to be passed through the Items property.

    Please pass the items in attachment control items property and check, it will work as expected.

     

    ---------------------------------------------------------------------------
    Glad it helped 🙂
    If this fixed your issue,
    please click “Does this answer your question?” to mark it as verified so others can find the solution easily.
    A Like 👍 is always appreciated, and I’m around if you need more help @Kalathiya
  • Suggested answer
    Valantis Profile Picture
    6,025 on at
     
    The key difference you've created is in the DataCardValue Default property.
     
    In the default form: DataCardValue10.Default = Parent.Default
    In your custom form: DataCardValue12.Default = Attachment_DataCard3.Default
     
    These are not equivalent. Parent.Default inside a DataCard always refers to the DataCard's own Default property, which is where the form passes the record's attachment data. When you reference Attachment_DataCard3.Default directly by name, you're bypassing the form's data binding hierarchy and the attachment control doesn't receive the pre-loaded file data correctly.
     
    Fix: change DataCardValue12's Default property back to:
     
    Parent.Default
    Don't reference the DataCard by name. The Parent keyword is the correct way to access the DataCard's Default from inside it.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 385

#2
Vish WR Profile Picture

Vish WR 367

#3
timl Profile Picture

timl 340 Super User 2026 Season 1

Last 30 days Overall leaderboard