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 / How to insert gallery ...
Power Apps
Answered

How to insert gallery with multiple columns records to common data service table

(0) ShareShare
ReportReport
Posted on by 8

I have a canvas app, I have gallery control inside the gallery control I have checkbox and dropdown onselect of checkbox the dropwdown which is on the same row with checkbox enables and disables on unchecking the checkbox. 

 

How can can I save checked items and dropdowns values to a table in common data service.

 

onSelect of checkbox I put the following logic:

 

      If(
       Checkbox3_1.Value = true,
       Collect(
      CheckboxTextValues2,
      {Services:Checkbox3_1.Text,Frequency:Dropdown2_1.SelectedText.Name}
      )
     );

 

it has problem of selecting different dropdown values  I but selects correct checked values of checkbox.

and If I uncheck still the values remain in collect so I am not sure how can I solve this problem and how can I submit checked values with selected dropdown values. see image of the gallery:

 

mjx_0-1606265046421.png

 

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @mjx 

    So I would say - why bother with a collection and trying to do this on check and uncheck?

     

    You can take a simpler approach and just reference the Gallery.  I am not sure of the purpose of your collection, but I am guessing from your description that you are then using it then create records (or update them).

    If that is the case then this type of formula is an easier approach to this:

    ForAll(
     Filter(Gallery3.AllItems, Checkbox3.Value),
     //Update or Patch here 
     //This is a sample to create records:
     Patch(yourDataSource, Defaults(yourDataSource),
     {
     Frequency:Dropdown2_1.Selected.Name
     }
     )
    )
    
    

    This example uses the records of the Gallery that are Checked in the checkbox and then creates a new record and uses the Dropdown2_1.Selected.Name of that row for the Frequency (note: avoid using SelectedText as it is a deprecated property).

    No collections needed for this...your Gallery already is a collection!

     

    This also assumes that your Dropdown Items property includes records that have a Name column.

     

    I hope this is helpful for you.

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard