cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Powerapps BInding to dropdown control?

Let's I have XLS file with the column which contains people names. I would like to have a dropdown on my editor form where I can bind sropdown to this column as well as to have the list populated with distinct names from the same column. And which would allow me to slelect a new value from the list to update the form to propagade changes to the datasource.

 

I can use context variable as a list to pass to this editor form from the view records form as a parameter for Navigate action ->

 

Navigate('EditorForm', ScreenTransition.None,  {GroupList: Distinct(SDS, PeopleNames)

28 REPLIES 28
Highlighted

Ok, I actually solved it.

 

When I connected my dropdown box to another datasource. For some reason, the DropDown1.Selected returned a result that was of type Record. I had to put DropDown1.Selected.Value in the Update property to actually get Text back.

Highlighted

Hi,

Can share your fuction or statement that you used? I have the same problem I can bind the field.

 

Thanks,

 

Highlighted

Here is a bit more detail on the situation that I have:

 

I have an Edit Form that shows a number of cards from data source which is an Excel table.

 

One of those cards is called Project Status - when the app was automatically generated, this card had a Text Box where the user could type the project status.

 

However, I wanted instead of a Text Box, this to be a dropdown that only allowed several choices. These choices are defined in another Excel table (this is just a one-column table that includes the allowed choices).

 

To replace the text box with the drop down, I did the following:

1. Connected to the other Excel table through Data Sources - the name of the source was tblProjectStatus

2. Selected the text box and deleted it.

3. Selected the card, and inserted a dropdown (let's call it DropDown1).

4. Selected the dropdown and under:

                             a. Items -> tlbProjectStatus.ProjectStatus (that gave me the list of allowed choices)

                             b. Defaul -> Parent.Default

5. Selected the card, and under Update -> DropDown1.Selected.Value

 

Initially, in step 5 I only typed DropDown1.Selected, the powerapps didn't like the type of the value returned. It turned out that DropDown1.Selected returns a Record. Hence, I added the .Value to get a Text back.

 

Highlighted

Hi 

I have followed your moves with this one, and in the edit screen, I can select the drop down etc. However when I save the edit card, the dropdown selection is not saved, even though I have set the update property as you have described. There are no error messages - just no update to that field of the record !!

any ideas

Cheers

Richard

Richard, could it be that your data source does not accept those values. Try adding a text box that shows any errors such that the text box text has YourFormName.Error.

Highlighted

Hi

Thanks for that - I was thinking along the same lines but had yet to work out how to show the error !

 

Many thyanks

 

Richard

Highlighted
Anonymous
Not applicable

Yes it's very clear! Thanks for your help.

Highlighted

Hi hpkeong,

I tried exactly what you said but it's not letting me set the Default attribute of the dropdown to Parent.Default neither the Update attribute of the card to Dropdown1.Selected.Value.

I tried to do it the other way around:

Default of the dropdown to Parent.Default.Value

Update of the card to Dropdown1.Selected

The warnings went away and everything seemed fine but at the moment of creating a new entry the server shows an error saying that a value is missing from the item (I don't have the exact error because my app is in spanish sorry)

Any ideas?

 

Thank you

Highlighted
Anonymous
Not applicable

Hi. You could try to begin a new project following the steps from the solution. It did work for me.
Highlighted
Anonymous
Not applicable

My card has Default as ThisItem.EventName

It's Update value is: DropDown1.Selected.Value

 

DropDown1's Default is Parent.Default

DropDown1's Items are: ["A", "B", "C"]

 

Even if the value is B, DropDown1 will display default as A.

 

Not sure what I'm missing here. Starting a new project may be too difficult as I have a lot of time vested in this one.


Thank you

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,867)