cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ShaneITAutomate
Helper V
Helper V

Checkboxes wont clear if i go from gallery (Canvas App offline)

Hi,

 

I have a canvas app thats completely offline (No forms), if i go to my editscreen via a gallery to edit a option and then goto add a new item the checkboxes do not empty?

 

Here is my add new item buttons onsubmit

 

Set(varMode, "New");

Concurrent(
UpdateContext({varReset1: false});
UpdateContext({varReset1: true}),
UpdateContext({varReset2: false});
UpdateContext({varReset2: true}));
Navigate(EditScreen, ScreenTransition.None)


Here is my edit button on my detail screen (after selecting from a browsegallery (standard onselect Select(Parent))
Set(varMode, "Edit")

and my checkboxes on the edit screen defaults are
If(
varMode="New",
Blank(),
BrowseGallery1.Selected.Amifittoperformcheck
)

 

I cant seem to figure this out>?

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@ShaneITAutomate 

If you just want them to be unchecked, then this is what you can use in the Default property:

If(varMode="New", false,
   BrowseGallery1.Selected.Amifittoperformcheck
)
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

8 REPLIES 8
RandyHayes
Super User
Super User

@ShaneITAutomate 

Checkboxes need either a true or false in the Default property.  Your formula is returning a blank for New.

Please consider changing your Formula to the following:

varMode="New" || BrowseGallery1.Selected.Amifittoperformcheck

 

I hope this is helpful for you. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

If i do that though randy the values from the browse gallery are not in the editscreen (ie all the checkboxes are clear). ill keep trying, you gave me an idea though.

RandyHayes
Super User
Super User

@ShaneITAutomate 

If you just want them to be unchecked, then this is what you can use in the Default property:

If(varMode="New", false,
   BrowseGallery1.Selected.Amifittoperformcheck
)
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

it was as simple as If(varMode="New", "", browsegallery.selected.sharepointcolumnitem)

 

 

RandyHayes
Super User
Super User

@ShaneITAutomate 

Except you are creating an error (and these will be your nightmare in play mode).  You are trying to set a boolean property to "" - which is text.

You need to replace the "" with false.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

I hear what your saying however if i use false it also removes the browsegallery.Selected entires, the checkboxes are not connected to yes/no columns they are text columns. What sort of problems would i expect>? as its currently working great.

RandyHayes
Super User
Super User

@ShaneITAutomate 

Yes, but this formula is going on a Default property of a CheckBox...correct??

If so, then a Default property on a Checkbox must be a true or false...not text.

 

The player for PowerApps is very sensitive to type conversions.  The designer, not so.  You can throw some serious trash at the designer and it will work fine, but put that into the player and it fails.  And, what is worse, sometimes the Player will work fine with it...but eventually the PowerApps team releases a new version where they "fix" the issue that it didn't have before and now you're into one of those "My app has been working for months and today it no longer works" situtations.

 

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

True, i was just saying perhaps that is why it is working for me. Either way i think i can mark it as solved, if it breaks down the track ill fix it then. Its currently working perfectly. Thanks for your help i appreciate it.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Top Solution Authors
Top Kudoed Authors
Users online (1,584)