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

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)

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Powerapps BInding to dropdown control?

Hi

 

1. Select the Card, Unlock and Insert Dropdown (let say Dropdown1) and delete the original TextInput

2. Create your own dropdown Items

3. Change the DEFAULT of Dropdown to Parent.Default 

[Note: All TextInputs are with Parent.Defualt. So, whatever replacement you made, please make sure the Default of the new input's Default is set to Parent.Default

4.  Now, Select the Card again (Card Bubble with the name of the Field, you can se them, Grey Color, Top Left Corner)

5. Then, look for UPDATE and change from Value#.Text to Dropdown1.Selected.Value

 

SubmitForm will take up anything within the Card, as define as within UPDATE. (This is similar to previous edition under CardGallery, if you are having experience from previous edition).

 

Hope this is clear.

(Sorry, I have no way to inser IMAGE because PowerApps Forum has changed..I don;t know how to insert)

 

Thanks and good night.

hpkeong
25 REPLIES 25
PowerApps Staff LauraOnu
PowerApps Staff

Re: Powerapps BInding to dropdown control?

Let me make sure I understand well the question, are we trying to populate the control with Names?

If yes, you can directly set the dropdown.Items to Distinct(SDS,PeopleNames) mentioned below via the ribbon Content tab: 

DropDownItems.jpg

Serge
Level: Powered On

Re: Powerapps BInding to dropdown control?

Ok. let's say I do have ViewRecord screen from which I would like ot edit the record. But I would like to edit by selecting the values from dropdown control instead of typing into TextControl available from Card associated with data source. So, the second picture shows Group (which is the field in Excel) but I would like to use only the list of names (which I can obtain certainly as distinct from the same Excel file). Seems like there is no way to use dropdowns within the "autogenerated" cards, by the way.

 

Capture1.JPGCapture2.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I have found the workaround by having "bare" dropdown controls (not cards) and to update source directly on Save.OnSelect like this -

If(isNewRecord, Patch(SDS, Defaults(SDS), {Group: ddGroup.Selected.Value}),Patch(SDS, BrowseGallery1_1.Selected, {Group: ddGroup.Selected.Value}));Navigate(ViewRecordForm,ScreenTransition.None)

 

isNew Record is a context variable I'm passing into depending on if I hit "+" or "->" from ViewRecords screen -

 

Navigate('SDS Duties',ScreenTransition.None, {GroupList: Distinct(SDS, Group), isNewRecord: true}) --- to add new

Navigate('SDS Duties',ScreenTransition.None, {GroupList: Distinct(SDS, Group), isNewRecord: fasle}) --- to update record

 

as you noticed I'm passing the GroupList which I'm binding the dropdown control to as well -

 

but it looks not really good to me... Is there other way of doing the same?

 

 

JLRishe
Level: Power Up

Re: Powerapps BInding to dropdown control?

I'm having the same problem. I can't seem to find a way to represent one of a data record's fields as a dropdown box (i.e. the same way they can be represented as text boxes). For example, if I have a data set of customer names and addresses, I would like to show the address' State as a dropdown instead of a text box. I can't find a way to do that.

 

I'm sure that Serge's workaround will work (haven't tried it yet), but it seems way too convoluted for a use case that's this fundamental.

 

Are we just missing something?

Super User
Super User

Re: Powerapps BInding to dropdown control?

Hi

 

Looks like you are referring to Auto-Generated Card, am I right?

Correct me if I get your point wrongly.

 

1. Select the Card

2. Select View - Advanced

3. You can see UnLock to Change property...Click

4. The card in now Unlock.

5. Card is originally bind to Parent.Default. Please click all the boxes, card, error message, ..inside to make sure you get the syntax (From Advanced, you can see all the syntax)

6. Delete the TextBox, insert a Dropdown as usual (Make sure you are still inside the Card).

7. Now, you need to modify all the (5) requirements so that when you SubmitForm, it will submit as of DropDown.Selected.Value.

 

NB: If you make a mistake, please delete the card and you can add the card again and it will be in LOCK mode and you can still Unlock as above.

 

AutoGenerated Cards are derived from Forms - Display and Edit, to replace the previous edition: CardGallery (Though I love CardGallery but it is gone).

It is Superfast to create Apps within one minutes. However, as you can see, if you need to make it more user friendly, you got to UNLOCK the card and modify. There are still some features missing and awaiting PG to add it back, I guess it is bug.

 

 

Please refer to: Understand Data Card in turorial.

 

Hope this helps.

hpkeong
Serge
Level: Powered On

Re: Powerapps BInding to dropdown control?

Thanks for you reply and explanation. I have figured out how to do Unlock but I'm not sure it's clear to me what "all (5) requirements" you're referring to? I have noticed that SubmitForm doesn't submit data from drop-downs.

I'm familiar with "card" tutorial, but I'm not aware of what are those necessary requirements in order to pick up and fire back the changes by calling SWubmiForm? Woudl you please help me?

Super User
Super User

Re: Powerapps BInding to dropdown control?

Hi

 

1. Select the Card, Unlock and Insert Dropdown (let say Dropdown1) and delete the original TextInput

2. Create your own dropdown Items

3. Change the DEFAULT of Dropdown to Parent.Default 

[Note: All TextInputs are with Parent.Defualt. So, whatever replacement you made, please make sure the Default of the new input's Default is set to Parent.Default

4.  Now, Select the Card again (Card Bubble with the name of the Field, you can se them, Grey Color, Top Left Corner)

5. Then, look for UPDATE and change from Value#.Text to Dropdown1.Selected.Value

 

SubmitForm will take up anything within the Card, as define as within UPDATE. (This is similar to previous edition under CardGallery, if you are having experience from previous edition).

 

Hope this is clear.

(Sorry, I have no way to inser IMAGE because PowerApps Forum has changed..I don;t know how to insert)

 

Thanks and good night.

hpkeong
WadeWebster
Level: Powered On

Re: Powerapps BInding to dropdown control?

Thanks for the detailed info for making dropdowns work as you would expect.

Feature Request - if the data connection (excel) has a defined drop down for a field, create a connection for the source data and use a Dropdown with that connection when creating an app 'automatically'.

Thanks
LEARN_IT
Level: Powered On

Re: Powerapps BInding to dropdown control? SharePoint list item

Hello, 

I have a similar situation. Please help: I have drapdown list that I want to bind the value to a SharePoint List Value(column).

For some reason I can't bind it. This should be easy to insert new data to a SP List from a form.

Drapdownlist.JPGDrapdownList to SP list

irsimeonov
Level: Powered On

Re: Powerapps BInding to dropdown control?

Hi hpkeong

 

I am able to insert a dropbox (let's call it DropDown1) and set the values to another data source. I then type in the Update property of the card: DropDown1.Selected. I then get an error attached to the Update property saying "The property expects Text values, but this rule produces incomatible records".

 

I don't understand why this error message given that the dropdown is a list of text values. I tried using Text() to wrap around DropDown1.Selected but it didn't work. Any idea how to fix?

 

Cheers

 

Ivan