cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AshleyFoozi
Frequent Visitor

Repeating Table and Dropdown

Hi All. I have seen a similar question here which has not been adequately answered. 

I have a repeating table in a gallery (using Shane Young's brilliant Youtube videos). In the row I have several fields; some text boxes and others drop downs. After filling the first row and creating the next row, I noticed that the selected drop down values go back to the first value of the Items. When looking at the collection the values are correct. Some users might think that their entry hasn't been saved. I have other repeating tables without drop downs and they work perfectly. Anybody have any suggestions?

First row entry.......

Capture1.PNG

Second Row entry.......

Capture2.PNG

 

34 REPLIES 34

Hey Kat,

 

If you haven't sorted this out yet you simply just have to tell the collect statement to use the same date that's selected in the form. That first clearcollect to start/load the collection would be:

ClearCollect(ECPLCollection,{PlanName: "", Hours:0.00, ECPLDate: ddDate.SelectedDate})
 
...and your save button would need to be updated to:
Patch(ECPLCollection, ThisItem, {PlanName: ddPlanName.Selected.PlanName, Hours: Value(ddHours.Selected.Value), ECPLDate: Value(dpECPLDate.SelectedDate)}); Collect(ECPLCollection, {PlanName: "", Hours: 0.00, ECPLDate: ddDate.SelectedDate})
 
This is just saying make the date whatever it is in the master form.

I realized you asked about the other fields as well and the short answer is whatever fields from the master form you want to show in the line items (on the SharePoint side) you need to have the columns created on the child SharePoint list, create the columns in the ClearCollect statement and have the values reference the form value field and then in the patch statements of both the gallery  and the form OnSuccess. You don't even need the actual fields shown in the gallery if all you want is include the data in the child SharePoint list as well. You can remove the date field control from the gallery as well. Here's where I just added the EmpID (EmpID: EmpIDValue1.Text) to the ClearCollect, Collect and Patch statements without adding a gallery field for it (since I'm telling it to use the value of what's in the master form:

vwyankee_0-1595282589628.png

The collection has the EmpID for each row:

vwyankee_1-1595282627991.png

After all that I am curious on the view that the managers would be using? Is there a reason they wouldn't be looking at it in Power Apps where there's no need to create redundant data? Is it being exported from the SP child list to Excel maybe?

I am having the worst time trying to find where the "DefaultSelectedItems" property is for the dropdowns in my gallery - can you point me in the right direction? TIA!

I'm having the worst time trying to find the "DefaultSelectedItems" property for the dropdowns in my gallery - can you point me in the right direction? TIA!

@minou325 - I'm not sure how you managed a duplicate post, but the property DefaultSelectedItems is only in comb box controls as you can also allow multiple selections, thus the plural of selected items. Drop-down controls only have a Default property as you can only choose a single selection. Galleries don't have this property.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,863)