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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Checkbox patch into Sh...
Power Apps
Unanswered

Checkbox patch into Sharepoint

(0) ShareShare
ReportReport
Posted on by 94
I have this collection named colMealItems it was trim to make a checklist now I want the below to follow.
✅ When a checkbox is checked/unchecked, it patches immediately
✅ When navigating away and back, the checkboxes must stay as previously selected
✅ User can continue where they left off (no reset, no lost progress)
this is my code for trim collection.
With({
cleaned:Substitute(Substitute(Substitute(Substitute(uplift.Text,","," "),Char(10)," "),Char(13)," "),Char(9)," ")},ClearCollect(colMealItems,ForAll(MatchAll(cleaned,"(?i)\b\d+\s*[A-Z]{4}\b"
),{MealName:Upper(Substitute(ThisRecord.FullMatch," ","")
),IsChecked: false })))
this is my code for patch i want to change it
Patch(  BeltPlanAutomated,   ThisItem,  { 'Selected SPML': Coalesce( Concat(Filter(galMealItems.AllItems, chkMeal.Value), MealName, ", " ), "None") });

 
Categories:
I have the same question (0)
  • Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    Hello @jayceeb,
     
    Please try with below approach:
     
    Upon selection of uplift (On Select Property); - Gallery
    UpdateContext({_selectedItem:ThisItem});
    //This will help us to update the item when the click on checkbox
    
    
    With(
        {
            cleaned: Substitute(Substitute(Substitute(Substitute(uplift.Text, ",", " "), Char(10), " "), Char(13), " "), Char(9), " ")
        },
        ClearCollect(
            colMealItems,
            ForAll(
                MatchAll(cleaned, "(?i)\b\d+\s*[A-Z]{4}\b"),
                {
                    MealName: Upper(Substitute(ThisRecord.FullMatch, " ", "")),
                    IsChecked: !IsBlank(LookUp(ThisItem.'Selected SPML', MealName = Upper(Substitute(ThisRecord.FullMatch, " ", ""))))
                }
            )
        )
    )
     
    Default Selection: 
    Default Property of the checkbox
     
    ThisItem.MealName in colMealItems.MealName
     
     
     
    Put below code on Check/Uncheck of checkbox: 
    // Update the local collection
    UpdateIf(
        colMealItems,
        MealName = ThisItem.MealName,
        { IsChecked: chkMeal.Value }
    );
    
    // Patch immediately to Dataverse
    Patch(
        BeltPlanAutomated,
        _selectedItem,
        {
            'Selected SPML': Coalesce(
                Concat(
                    Filter(colMealItems, IsChecked),
                    MealName,
                    ", "
                ),
                "None"
            )
        }
    )
     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard