cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jose1
Level: Powered On

Patch a Gallery and DropDown Values

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

1 ACCEPTED SOLUTION

Accepted Solutions
Jose1
Level: Powered On

Re: Patch a Gallery and DropDown Values

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,

View solution in original post

8 REPLIES 8
SChappell2580
Level: Powered On

Re: Patch a Gallery and DropDown Values

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
Level: Powered On

Re: Patch a Gallery and DropDown Values

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
Level: Powered On

Re: Patch a Gallery and DropDown Values

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
Level: Powered On

Re: Patch a Gallery and DropDown Values

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.

Jose1
Level: Powered On

Re: Patch a Gallery and DropDown Values

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,

View solution in original post

ChrisWest
Level: Powered On

Re: Patch a Gallery and DropDown Values

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
Level: Powered On

Re: Patch a Gallery and DropDown Values

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

pinarrehber
Level: Powered On

Re: Patch a Gallery and DropDown Values

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, 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,947)