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
timl
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
timl
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?

timl
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (47,331)