cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AuburnMist
Resolver I
Resolver I

Attachments datacard

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

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
PowerRanger
Super User
Super User

@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.




​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.

View solution in original post

AuburnMist
Resolver I
Resolver I

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)

 

View solution in original post

9 REPLIES 9
PowerRanger
Super User
Super User

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




​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
Super User
Super User

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




​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
Resolver I
Resolver I

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)

 

 

AuburnMist
Resolver I
Resolver I

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

PowerRanger
Super User
Super User

@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.




​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
Super User
Super User

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

 

 




​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
Super User
Super User

@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.




​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
Resolver I
Resolver I

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
Super User
Super User

@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.

 

 

 




​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.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,129)