cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

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
Highlighted
Advocate II
Advocate II

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

13 REPLIES 13
Highlighted
Helper II
Helper II

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

Highlighted
Advocate II
Advocate II

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.

Highlighted
Helper II
Helper II

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

Highlighted
Advocate II
Advocate II

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.

Highlighted
Advocate II
Advocate II

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

Highlighted
Frequent Visitor

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

Highlighted
Advocate II
Advocate II

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.

Highlighted
Helper I
Helper I

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, 

Highlighted
Anonymous
Not applicable

Re: Patch a Gallery and DropDown Values

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 🙂

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,710)