cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alietzau
Advocate II
Advocate II

Convert Strings to Boolean

I have a powerapp that is connecting to a Excel spreadsheet. One of the columns in the sheet uses TRUE/FALSE values. I would like to use this as a boolean to limit some of the functionalities in my app but I can't convert the text to a Boolean data type. I've looked through the functions but I couldn't find anything. Is there a trick that I should be using?

1 ACCEPTED SOLUTION

Accepted Solutions
dinusc
Microsoft
Microsoft

The following should work:

If(Lower(Your_Text)="false", false, true)

View solution in original post

3 REPLIES 3
dinusc
Microsoft
Microsoft

The following should work:

If(Lower(Your_Text)="false", false, true)

Anonymous
Not applicable

I prefer this solution since it's less code.  Assuming your text values will either be true or false.

 

Set Default: Value(ThisItem)

max81
Impactful Individual
Impactful Individual

@Anonymous strange. For me this doesn't work if the text is "false". I tried it with a simple text_input control and a toggle button.

Helpful resources

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