cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AGS94 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
Super User

Re: Text/Boolean Incompatibility When Setting a Variable From Datasource

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
Super User

Re: Text/Boolean Incompatibility When Setting a Variable From Datasource

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

AGS94 Resolver I
Resolver I

Re: Text/Boolean Incompatibility When Setting a Variable From Datasource

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
Super User

Re: Text/Boolean Incompatibility When Setting a Variable From Datasource

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,203)