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)

View solution in original post

david3000
Regular Visitor

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

 

Set Default: Value(ThisItem)

max81
Kudo Kingpin
Kudo Kingpin

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

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,554)