cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Hiding a button if there is not an attachment

Hi all, I have another visibility question.

I do not want the navigation button (IconAccept2) to appear if a user has not attached an attachment. Currently i have the button hidden if two other questions are not answered and it works. However the underlined and bold section causes an error. How can i fix this?  

Visible: 
!IsBlank(Radio1.Selected.Value)
And
!IsBlank(Dropdown4.Selected.Text)
And
!IsBlank(DataCardValue29.Selected.value)

3 REPLIES 3
eka24
Super User
Super User

Try:

!IsBlank(Radio1.Selected.Value)
And
!IsBlank(Dropdown4.Selected.Text)
And CountRows(DataCardValue29.Attachments)=0

 

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

 

Anonymous
Not applicable

Hi eka24, I tried that but the button still appears even if there has not been an attachment added. Did I miss a step?

I suggest you insert a textbox that picks the Dropdown4.Selected and use the textbox in the formula. Example
TextBox1: Dropdown4.Selected.Value OR Dropdown4.SelectedText.Value. If you have an existing textbox that picks the dropdown, you can rather use that.

Then:

!IsBlank(Radio1.Selected.Value)
And
!IsBlank(TextBox1.Text)
And CountRows(DataCardValue29.Attachments)=0

 

For the original formula, check this portion: !IsBlank(Dropdown4.Selected.Text)

Should be !IsBlank(Dropdown4.SelectedText.Value)

 

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

 

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.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

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 (3,701)