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

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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,027)