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 / Patch a Gallery and Dr...
Power Apps
Answered

Patch a Gallery and DropDown Values

(1) ShareShare
ReportReport
Posted on by 98

Hello everyone,

 

(I'm currently patching to Excel; however, once I'm done testing, I'm going to link to Azure.) 

 

I'm currently working on a app that functions like a checklist. The following is what I'm trying to accomplish:

 

- A user selects a value from a dropdown which filters a gallery. On the gallery, each record has a corresponding dropdown. The user selects the corresponding values for each client and submits. Upon submit, the records on the gallery along with the corresponding drop down values are patched to a table.

 

If this is not possible, what other route can I take?

 

The following is a screenshot of the layout, minus any aesthetics.

 

screenshot.PNG

Categories:
I have the same question (0)
  • SChappell2580 Profile Picture
    72 on at

    Hi please try the following:

     

    Create a button for submitting the data and set the the OnSelect property to

     

    Patch(TableName,Defaults(TableName),{ColumName:Nameofdropdown.Selected.Value})

     

    Please note the parts in bold above are where you will need to add your own info

     

    I hope this helps

     

    Scott

  • Jose1 Profile Picture
    98 on at

    Hello,

     

    Thank you for responding! I tried it but it only patched one record and only the value from the drop down.

     

    The table I'm patching to is called "MealTime." This table has three columns:

    - location

    - client_name

    - ate

     

    The gallery is referncing another table which has two columns:

    - location

    - client_name

     

    On this gallery, I have a dropdown called "Ate." I want to patch "MealTime" with all the records in the gallery and the corresponding Ate value.

     

    I want to patch multiple records, each will have a location, client name, and whether they ate.

  • SChappell2580 Profile Picture
    72 on at

    Hi,

     

    You will need to patch each dropdown box value to a column within your data source

     

     

    Patch(MealTime,Defaults(Mealtime),{location:Dropdown5.Selected.Value, client_name:Dropdown6.Selected.Value,ate:Dropdown7.Selected.Value})

     

     

    You can add more drop downs if you need to the above

     

    If you need anymore help ill try my best to help further

     

    Scott

  • Jose1 Profile Picture
    98 on at

    I tried the following:

     

    Partch(MealTime, Defaults(MealTime), {location: Gallery3.Selected.location, client_name: Gallery3.Selected.client_name, ate: Ate.Selected.Value})

     

    It is only patching whichever record I click on the gallery prior to submitting. I would like it to patch all the records being displayed on the gallery.

     

    I appreciate you taking the time.

  • Verified answer
    Jose1 Profile Picture
    98 on at

    I was able to figure it out. I used the following formula:

     

    ForAll(Gallery.AllItems, Patch(MealTime, Defaults(MealTime), {location: location, client_name: client_name, ate: Ate.Selected.Value}))

     

    All the clients in the gallery along with their corresponding location and drop down value were patched.

     

     

    regards,

  • ChrisWest Profile Picture
    4 on at

    Can a combination of label and toggle values be used as well?

    Patch('Extinguisher List',Defaults('Extinguisher List'),{Date:Label1.Value,Pass:Toggle1.Selected.Value,Label2:User})

     

    I am trying to create a field check for the extiguishers and all I want to update in the record is user, date, and pass or fail. May get more advanced once I get this going.

     

    Chris West

  • Jose1 Profile Picture
    98 on at

    Can you provide a screenshot, so I can get a better idea of what you are trying to accomplish.

  • Community Power Platform Member Profile Picture
    on at

    Hi, 

     

    I have several screens displaying data from one table, they are just filtered versions of the table compared to different categories. I have only one details and one submit page. I have directed all the form screens to that details page and submit page through use of variable. I have datepicker on my submit page. I have a column for users to enter a date (I didnt want them to enter date in freetext format since there would be format differences from user to user, so I put datepicker instead). On the submit form icon I have put a patch function like this: Patch(ALLINONE,BrowseGallery3_ALL.Selected,{ACTUAL_DATE: DatePicker19ss.SelectedDate})

    But user may end up in that submit page from different galleries so Instead of BrowseGallery3.Selected it should be for all galleries. How can I do that? 

    Thanks, 

  • Community Power Platform Member Profile Picture
    on at

    Hi!
    this formula is work with me in case the same data source is using in the gallery,but can you please help me to patch the data to different Datasource than which used by the gallery, or is there is any way to make the gallery use multiple data sources,so when I click the button will patch the data to another data source 

    Patch('Work Inputs', Defaults('Work Inputs'),
    {wbc_starttime:StartTime,wbc_endtime:Now(),wbc_name:"Testing B ",wbc_duration:DateDiff( StartTime, Now(), Minutes )} ,
    {wbc_workinputstatus:'Work Input Status'.Working});
    gallery datasource name :Ticket,but i want patch data to work input datasource when i click End button to calculate the time 

    Thank you for your effort,Appreciate it 🙂

  • Jose1 Profile Picture
    98 on at

    Try the following:

     

    ForAll(Ticket Gallery, Patch('Work Input', Defaults('Work Input'), {<your fields>}))

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard