Have looked for an answer, but cannot find one in either here or the documentation.
I have 2 galleries (different filters of a sharepoint list) both restricted to 5 items each. the gallery shows the title of the item, a date label and I have added a dropdown (not available in the original SP list).
I am looking to fill a seperate collection with the combined outputs of each gallery item (in each gallery and some non-gallery fields) so it would look something like this:
Milestone_1_Title | Milestone_1_Duedate | Milestone_1_Dropdown | Milestone_2_Title | Milestone_2_Duedate etc.
I cannot find anywhere that talks through how to reference indvidual elements within a gallery (the dropdown.selectedtext for example).
Any help would be much apreciated.
Solved! Go to Solution.
Hi @cjberr89 ,
Could you please share a bit more about your scenario?
Do you want to combine each item (5 items in total) in first Gallery with corresponding item in second Gallery, then save it into a collection?
I have made a test on my side, please take a take a try with the following workaround:
Set the OnSelect property of the "Combine" button to following:
Clear(MergedCollection);
ForAll( FirstN([1,2,3,4,5,6,7,8,9,10], CountRows(FirstGallery.AllItems)), Collect( MergedCollection, { Milestone_1_TitleColumn: Last(FistN(FirstGallery.AllItems, Value)).Milestone_1_Title.Text,
Milestone_1_DuedateColumn: Last(FistN(FirstGallery.AllItems, Value)).Milestone_1_Duedate.Text,
Milestone_1_DropdownColumn: Last(FistN(FirstGallery.AllItems, Value)).Milestone_1_Dropdown.Selected.Value,
Milestone_2_TitleColumn: Last(FistN(SecondGallery.AllItems, Value)).Milestone_2_Title.Text,
Milestone_2_DuedateColumn: Last(FistN(SecondGallery.AllItems, Value)).Milestone_2_Duedate.Text,
Milestone_2_DropdownColumn: Last(FistN(SecondGallery.AllItems, Value)).Milestone_2_Dropdown.Selected.Value } ) )
Note: I assume that the Milestone_1_Title, Milestone_1_Duedate are Label controls in your First Gallery, the Milestone_1_Dropdown is a Dropdown in your First Gallery. The Milestone_2_Title, Milestone_2_Duedate are Label controls in your Second Gallery, the Milestone_2_Dropdown is a Dropdown in your Second Gallery.
After you press the above "Combine" button, the merged outputs would be populated into the MergedCollection.
Please consider take a try with above solution, check if the issue is solved.
Best regards,
Hi @cjberr89 ,
Could you please share a bit more about your scenario?
Do you want to combine each item (5 items in total) in first Gallery with corresponding item in second Gallery, then save it into a collection?
I have made a test on my side, please take a take a try with the following workaround:
Set the OnSelect property of the "Combine" button to following:
Clear(MergedCollection);
ForAll( FirstN([1,2,3,4,5,6,7,8,9,10], CountRows(FirstGallery.AllItems)), Collect( MergedCollection, { Milestone_1_TitleColumn: Last(FistN(FirstGallery.AllItems, Value)).Milestone_1_Title.Text,
Milestone_1_DuedateColumn: Last(FistN(FirstGallery.AllItems, Value)).Milestone_1_Duedate.Text,
Milestone_1_DropdownColumn: Last(FistN(FirstGallery.AllItems, Value)).Milestone_1_Dropdown.Selected.Value,
Milestone_2_TitleColumn: Last(FistN(SecondGallery.AllItems, Value)).Milestone_2_Title.Text,
Milestone_2_DuedateColumn: Last(FistN(SecondGallery.AllItems, Value)).Milestone_2_Duedate.Text,
Milestone_2_DropdownColumn: Last(FistN(SecondGallery.AllItems, Value)).Milestone_2_Dropdown.Selected.Value } ) )
Note: I assume that the Milestone_1_Title, Milestone_1_Duedate are Label controls in your First Gallery, the Milestone_1_Dropdown is a Dropdown in your First Gallery. The Milestone_2_Title, Milestone_2_Duedate are Label controls in your Second Gallery, the Milestone_2_Dropdown is a Dropdown in your Second Gallery.
After you press the above "Combine" button, the merged outputs would be populated into the MergedCollection.
Please consider take a try with above solution, check if the issue is solved.
Best regards,
Thanks @v-xida-msft ,
Used your method to create a combined collection, then used the Last(FirstN(...., 1), Last(FirstN(...., 2) to bring everything onto one row.
Thanks
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
204 | |
97 | |
60 | |
51 | |
46 |
User | Count |
---|---|
255 | |
158 | |
87 | |
79 | |
59 |