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

How to make a collection not Pre-populate

Hi,

 

I currently have a gallery with dropdowns that are text values and the values are set in alphabetical order and a collection that is connected to the gallery. I notice that every time I open this screen, the collection is already per-populated with information from the dropdowns. Is there a formula I can use so that this doesn't occur?

 

Thanks,

Ryan

 

2 REPLIES 2
DougPearce
Level: Powered On

Re: How to make a collection not Pre-populate

Based on your description, it sounds like your collection is connected directly to the dropdowns, and not based on the Gallery items. Are you wanting the collection to capture the values selected in the dropdowns? Do you have a button to submit or save the answers?

 

If so, you'll want to add a collection to the button, using the OnSelect property, based on the following code:

 

ClearCollect(
<collection name>,
ForAll(
<gallery name>.AllItems,
{
<collectionfieldname>: <gallery item name or id>.Text,
<collectionfieldname>: <dropdown name>.SelectedText.AnswerId
}
)
);

 

When the button is pressed, the selected values from each dropdown will be saved to the collection. 

Community Support Team
Community Support Team

Re: How to make a collection not Pre-populate

Hi @Ryan_LaCroix ,

 

Can you please share the formula that you use to create this collection?

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,056)