Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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:
  • v-jefferni Profile Picture
    on at
    Re: Trouble with Checkboxes and clearing down data

    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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 250 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 120

#3
stampcoin Profile Picture

stampcoin 108

Overall leaderboard