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 / patching checkbox sele...
Power Apps
Answered

patching checkbox selected items

(0) ShareShare
ReportReport
Posted on by 774 Moderator

I have a massive brainfart and can't figure this out, the best result was patching some empty rows...

 

I would like to patch one column in the records of items selected in the gallery (using the checkbox), the value to patch would come from the dropdown.

 

ForAll(Filter(Gallery1.AllItems, Checkbox1.Value=true),
Patch('Assets',
{asset_location: DDmoveto.SelectedText};
);
)

 

i'm sure it's something silly but my brain refuses to cooperate today...

Categories:
I have the same question (0)
  • MF-12051538-0 Profile Picture
    402 on at

    Hi @elseb ,

    You don't need "=true", as Checkbox1.Value by itself will return true or false. Also, try explicitly selecting the field name from your drop down.

    e.g.


    ForAll(
    Filter(Gallery1.AllItems, Checkbox1.Value),
    Patch(
    Assets,
    {asset_location: DDmoveto.Selected.ColumnName}
    )
    );

    If you found this post helpful, please consider Accepting it as the solution.

     

  • elseb Profile Picture
    774 Moderator on at

    Thank you, i think I haven’t explained it well enough and my code being so far off it didn’t help either…

    what I’m trying to do is 

     

      Patch(

                 Assets,

                 LookUp(Assets, asset_number = Gallery1.Selected.asset_number),

            {asset_location: DDmoveto.Selected};

    )

     

    but for all the items selected in gallery using checkbox control 

     

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @elseb,

    You should post the specific error message corresponding to the formula.

    Could you please tell me that

    1). what is the column type of the asset_location, is it a Choice type?

    2). how you set the Items property of the DDmoveto?

     

    Generally, if the asset_location is a choice column, and you set the DDmoveto using the Choices() function, you should modify your formula as below:

     Patch(
    
     Assets,
    
     LookUp(Assets, asset_number = Gallery1.Selected.asset_number),
    
     {asset_location: {Value:DDmoveto.Selected.Value}}
    
    )

     

  • Verified answer
    elseb Profile Picture
    774 Moderator on at

    Hi,

     

    I've managed to do it with:

    ForAll(
     RenameColumns(
     Filter(
     colAssets,
     isChecked
     ),
     "ID",
     "TID"
     ),
     Patch(
     'Assets',
     LookUp(
     'Assets',
     ID = TID
     ),
     {asset_location: DDmoveto.SelectedText}
     )
    );

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,041

#2
11manish Profile Picture

11manish 676

#3
Valantis Profile Picture

Valantis 655

Last 30 days Overall leaderboard