web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Trouble with Checkboxe...
Power Apps
Unanswered

Trouble with Checkboxes and clearing down data

(0) ShareShare
ReportReport
Posted on by

Hi there, 

I have an app with a simple : 

 

ClearCollect(InternalChecksChxBoxTrackerCollection,
{CheckBox: "Interior Condition", Value: false, Saved: false},
{CheckBox: "SeatBelts", Value: false, Saved: false},
{CheckBox: "Partition", Value: false, Saved: false},
{CheckBox: "Other", Value: false, Saved: false});

Within App Start. 

 

I then have checkboxes like this : 

 

jdhough55_0-1656075081591.png

 

If the user does not press the SAVE button, then next time they go into the screen the tickboxes will be blank (unless they saved of course) - this is done by Reset(tickbox) in the OnHidden on this screen. 

 

So when the SAVE button is pressed then I do a simple 

 

Update(InternalChecksChxBoxTrackerCollection,First(Filter(InternalChecksChxBoxTrackerCollection,CheckBox = "Interior Condition")),{CheckBox: "Interior Condition", Value: chkInteriorConditionVCICS.Value, Saved: true});

 

This will update the column in the collection with the value of the checkbox and most imported Saved = true. 

 

On the checkbox itself, I  need to do the SelectAll situation. I have done this by adding a count (so if the collection hais 4 True's (i.e selected) then it lights up the SelectAll button and in turn this will deselect the Select All if the user removes one etc. 

 

when not saved the checkbox will update the collection with a NOT SAVED flag and when the user presses SAVE then the collection will patch with a SAVED = YES, so the selection will be carried over when the user comes out of the screen and back into it. 

 

So the collection  will have some checkboxes which have been saved and some that are not save (in a flag state) - I cannot seem to figure out how i would do the defualt on each checkbox.. At the moment - i have

If(SelectAll,true,LookUp(InternalChecksChxBoxTrackerCollection,CheckBox = "Other" And Saved = true).Value)

 

Selectall is the context variable i am setting on the selectAll - so if selectAll is true then show the tick box - this is not working and it is showing inconsitent results.. 

What is the best way to do this when we have all the reset checkboxes on the hidden. 

 

I am completely at a loss. 

 

 

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    on at

    Hi @Anonymous ,

     

    You may consider use a Gallery with Check boxes, set Items to the collection. So there will be 5 items in the Gallery, each with a Check box. The values of Check boxes can bound to each row of the collection, via ThisItem.Saved or ThisItem.Value or even ThisItem.Saved || ThisItem.Value

     

    Best regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard