cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simms7400
Level 8

Possible to create a dropdown based on a Column from another data soure?

Hi Folks -

 

I have a SharePoint table that I use to accept user requests for our Master Data Management system.

Once of the Column I populate is called "Indication" so I have pulled that into the form.

 

However, I do not want end users to enter it manualy (for error purposes). I actually manage a master list of all "Indications" in another table ("Indication_List") in a column called "Alias".

 

Is it possible to have my field "Indication" in my form reference the table "Indication_List" and pulled in all rows contained in the Column "Alias"? This will allow end user to scroll through the list and select the appropriate one.

 

Thank you!

14 REPLIES 14
WillPage
Level 8

Re: Possible to create a dropdown based on a Column from another data soure?

Have a drop down (let's call it dropdown_indication) with the source "Indication_List", then have your Text Input control on the form's Text property to be dropdown_indication.Selected.WhateverColumn.

 

Place the drop down over the top of the input form's "indication" Text Input box so the user can't see it or click on it. It'll look like the drop down is part of the form, but it's actually not. You create the link between the indication list and the input form by setting the Text propery of a control on the input form to be the output of an unrelated dropdown control.

simms7400
Level 8

Re: Possible to create a dropdown based on a Column from another data soure?

@WillPage 

 

Thank you!  Where would I create the dropdown_Indicaiton field? Do I need to do it on my underlaying table or can I create new new within powerapps?

simms7400
Level 8

Re: Possible to create a dropdown based on a Column from another data soure?

@WillPage   ah, I'm almost there. I've been able to add the field and get the drop down to populate, however when I submit, it's not showing up on the table.  but I think it's because I didn't link the orinal text field ("Indication") to the new dropdown field.  I'm trying to find where to link them using your suggested syntax but can't seem to find the input box. Can you shed some light on this?


Thank you!

simms7400
Level 8

Re: Possible to create a dropdown based on a Column from another data soure?

@WillPage I got it!

 

My only additional question would be how do I get rid of the prepopilated value? FOr instance, it dispayes the first value in the table "Indication_List". Is there a way to keep that blank until an end user choses a selection?

 

Thank you!

WillPage
Level 8

Re: Possible to create a dropdown based on a Column from another data soure?

The input box will be on your form that the user fills out. It'll be in a data card named according to the column (probabaly IndicationDataCard1, and then a text input within that called DataCardValue3 or similar). If you don't see it, you will need to add it in the properties of the form.

 

For example, this simple app has a text input called DataCardValue7 for the Notes column in SharePoint, and it looks like this in the tree view:

Capture.PNG

In this instance I would set the Text property of DataCardValue7 to mydropdown.Selected.Name, where Name is the column of the data source containing the predefined choices that the mydropdown Items property is set to. It doesn't matter what column you display in the dropdown for the user to select, all the columns from the data source are available within the Selected property of it so you need to define it downstream.

 

You will need to make the SP list column type Single line of text (not a choice field or anything like that) so that the text input box is compatible. If your column is Single line of text then the form will automatically generate a data card containing a text input box. If you started with a choice field and changed it later you might need to remove the data source, re-add it and then delete the data card for that column and re-add it.

 

 

WillPage
Level 8

Re: Possible to create a dropdown based on a Column from another data soure?

@simms7400you can clear the Default property of a control to make it blank when first seen. You will also need to introduce some logic to clear the Selected value when the user goes back to repeat the process. You can do this by setting the reset property of the drop down to a boolean context variable which you toggle in the OnVisible perperty of the screen e.g, 

Screen1.OnVisible

UpdateContext({con_resetdropdown:con_resetdropdown});
UpdateContext({con_resetdropdown:!con_resetdropdown})

Dropdown.Reset

con_resetdropdown

 

simms7400
Level 8

Re: Possible to create a dropdown based on a Column from another data soure?

@WillPage  Thank you, sir. I will try this.

 

Is the OnVisible property in the "Advanced" section? I can't seem to find it. I only see "Visible" which is already a boolean.

 

Thanks!

WillPage
Level 8

Re: Possible to create a dropdown based on a Column from another data soure?

It's a property of the screen, e.g Screen1.OnVisible. Any function within that property will run when you navigate to the screen.



 

simms7400
Level 8

Re: Possible to create a dropdown based on a Column from another data soure?

@WillPage  thanks, Will. I"m till unable to locate the section where I would change that. If it wouldn't be too much trouble could you provide a screen shot? Thank you!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 347 members 6,035 guests
Please welcome our newest community members: