cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
omi18
Post Patron
Post Patron

Icon Visible Setting

Hello,

 

I have an icon with visible property set to: If(ThisItem.Cancel = 1,true,false) 

 

What I'm trying to do is if the cancel column has value 1 then show the icon else hide it. I'm using an SQL Server as a data source and the Cancel column will have 0 or 1 as a value. 

 

What I'm missing here? 

 

Thanks,

Omi

3 REPLIES 3
rubin_boer
Super User
Super User

hi @omi18 your expression is correct, what type of error (if any) or behavior do your get do you get? if ThisItem.Cancel is a string you will have convert it, Value(ThisItem.Cancel) = 1 or ThisItem.Cancel = "1" 

 

Hope this helps

Hi @rubin_boer ,

 

Cancel is a bit datatype in the database. I'm getting no error. 

 

Thanks,

Omi

timl
Super User
Super User

Hi @omi18 

Power Apps should map bit fields to the boolean data type. Therefore, if you were to set the visible property of your icon to just this, that should hopefully work:

ThisItem.Cancel

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,013)