cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Resolver I
Resolver I

Text/Boolean Incompatibility When Setting a Variable From Datasource

 

I have the following formula in the OnSelect of the next arrow of a gallery (FavProd😞

 

Select(Parent)
;If(FavProd.Selected.ChkC=false,Set(VarChkC,false),Set(VarChkC,true)
;Navigate(Mixing,ScreenTransition.Fade)

The user has the option to save several settings back to an Excel file (saved in OneDrive), of which a checkbox "C" (ChkC) is one of  those setting options.

 

What I am trying to do above is recall the user's selection from this Excel file to auto-populate the ChkC checkbox when that user selects a given favorite from the gallery. I assume my issue is with the following portion of the formula, but am not sure how to correct it:

FavProd.Selected.ChkC=false

 

The error I am getting is:

PA20191004.png

 

Side note: ChkC is the name of: a) the checkbox in question, b) the column name in the Excel file. Don't see this being an issue, but wanted to mention it to avoid confusion.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @AGS94 

Can you confirm the values that you're storing in the chkC column in your spreadsheet? If you're storing the text values "true" and "false" in this column, you could try testing against the string value "false" to see if that fixes your problem.

 

Select(Parent)
;If(FavProd.Selected.ChkC="false",Set(VarChkC,false),Set(VarChkC,true)
;Navigate(Mixing,ScreenTransition.Fade)

 

View solution in original post

3 REPLIES 3
Super User III
Super User III

Hi @AGS94 

Can you confirm the values that you're storing in the chkC column in your spreadsheet? If you're storing the text values "true" and "false" in this column, you could try testing against the string value "false" to see if that fixes your problem.

 

Select(Parent)
;If(FavProd.Selected.ChkC="false",Set(VarChkC,false),Set(VarChkC,true)
;Navigate(Mixing,ScreenTransition.Fade)

 

View solution in original post

That did the trick. Is there a way to save the original value to Excel as a boolean value, or will it always save as text?

Super User III
Super User III

Glad that did the trick. I don't it's possible to save the orginal value to Excel as a boolean value, but maybe someone else here with more experience in Excel might be able to comment.

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (9,439)