web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : 76j+N4HhpQX5zWBWGM0hR5
Power Apps - Building Power Apps
Answered

Attachments datacard

Like (0) ShareShare
ReportReport
Posted on 15 Feb 2022 19:46:19 by 239

Hello,

 

I have a need to reference the attachments data card in one of my formulas, but I can't figure out which syntax is correct, as none of them seem to work. Can someone please tell me how to proceed?

 

AuburnMist_0-1644954183039.png

AuburnMist_1-1644954212484.png

AuburnMist_2-1644954262732.png

 

Thank you

 

I have the same question (0)
  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on 15 Feb 2022 at 21:55:29
    Re: Attachments datacard

    @AuburnMist I am really sorry to tell but your formular can't work

     

    Plese have a look at the If Syntax: If( Condition1, ThenResult1 [, Condition2, ThenResult2, ... [ , DefaultResult ] ] )

     

     

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

     

     

  • Verified answer
    AuburnMist Profile Picture
    239 on 15 Feb 2022 at 21:44:57
    Re: Attachments datacard

    Thank you for continuing to work on this. When I thought I had it, I actually didn't! 

     

    I ended up with this, and it works perfectly. 

     

    If(IsBlank(DataCardValue1_1.Text)&(DataCardValue9_1.Text),(DataCardValue7_1.Selected.Value),(DataCardValue6_1.Selected.Value),(DataCardValue4_1.Selected.Value),(DataCardValue8_1.Selected.Value),(DataCardValue10_1.Text),Disabled,Edit) & If(CountRows(DataCardValue25_1.Attachments) = 0, Disabled, Edit)

     

  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on 15 Feb 2022 at 20:21:34
    Re: Attachments datacard

    @AuburnMist Please consider to change your formular to this pattern

     

    If(Or(IsBlank(DataCardValue1.Text),IsBlank(DataCardValue5.Text)),Disable,Edit)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on 15 Feb 2022 at 20:17:12
    Re: Attachments datacard

    @AuburnMist Just had a look at your formular....This actually can't work...

     

     

  • Verified answer
    PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on 15 Feb 2022 at 20:08:57
    Re: Attachments datacard

    @AuburnMist as i am not at my PC I can't verify what I think should work.

     

    Try this

     

    If(CountRows(Datacardvalue25_1.Attachments) = 0, Blank(), false)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • AuburnMist Profile Picture
    239 on 15 Feb 2022 at 20:08:42
    Re: Attachments datacard

    Please disregard. I found the problem! 

     

    I was using DataCardValue instead of ThisItem. 

     

    I rewrote the formula and for the attachments, I used ThisItem.Attachments, and my issue is gone. 

     

    Thank you

  • AuburnMist Profile Picture
    239 on 15 Feb 2022 at 19:59:14
    Re: Attachments datacard

    Definitely, let me elaborate further;

     

    I am writing a formula in the DisplayMode function of my Submit button.

     

    The Submit button must remain in Disable mode until such a time as all of the fields are filled in. When all the fields are filled in, the button becomes 'enabled' (Edit). 

     

     

    If(IsBlank(DataCardValue1_1.Text),(DataCardValue9_1.Text),(DataCardValue7_1.Selected.Value),(DataCardValue6_1.Selected.Value),(DataCardValue4_1.Selected.Value),(DataCardValue5_1.SelectedDate),(DataCardValue8_1.Selected.Value),(DataCardValue10_1.Text),Disable,Edit)

     

     

  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on 15 Feb 2022 at 19:50:58
    Re: Attachments datacard

    @AuburnMist I am asking because datacardvalue25_1.Attachments is actually a Table. So you cant just reference this in Lets say a Label... 

  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on 15 Feb 2022 at 19:48:09
    Re: Attachments datacard

    @AuburnMist could you provide some more details. Where do you need to reference the datacard and whats the purpose? 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473