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

How to reuse item list used by different dropdownlist

Hi,

 

I have used a dropdownlist in screen with a edit/new form

I have list the different possibilities in the items property: ["Auto","Exam at end","Exam to plan","Independent","N/A"]

I have another screen where I am building the 'grid' view (https://powerapps.microsoft.com/en-us/blog/editable-tables/) which also uses this dropdownfield.

How can I refer to the items used in the first dropdownlist? I want to avoid that I need to update the items property of both dropdownlist.

It doesn't seem that collections are the solution, because those are only temporary.

 

Thanks!

Kr

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: How to reuse item list used by different dropdownlist

You could create a collection in the OnStart of the App and then use that collection in the items property and grid view. The collection will be recreated every time the app is opened which is no different then you hard coding the table in the Items property.

 

App > OnStart 

ClearCollect(colStatus, ["Auto","Exam at end","Exam to plan","Independent","N/A"])

 

Add the above formula to the OnStart then right click App and Run OnStart, so it executes without you having to log out and back in. Then use colStatus in Items property and grid view. 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: How to reuse item list used by different dropdownlist

You could create a collection in the OnStart of the App and then use that collection in the items property and grid view. The collection will be recreated every time the app is opened which is no different then you hard coding the table in the Items property.

 

App > OnStart 

ClearCollect(colStatus, ["Auto","Exam at end","Exam to plan","Independent","N/A"])

 

Add the above formula to the OnStart then right click App and Run OnStart, so it executes without you having to log out and back in. Then use colStatus in Items property and grid view. 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Super User
Super User

Re: How to reuse item list used by different dropdownlist

Hi @ThomasVDS 

You could set the items property of the second dropdown to 

Distinct(datasource, ColumnName)

Then your second dropdown will consist of all of the choices already existing in that column of the datasource.  If new items are added to the first dropdown and selected for inclusion in the datasource, the second dropdown will always be current. 

ThomasVDS
Level: Powered On

Re: How to reuse item list used by different dropdownlist

@Jeff_ThorpeI thanks for your suggestion, this could do the trick :-)

 

Kr

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 451 members 4,861 guests
Recent signins:
Please welcome our newest community members: