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

Set default selection for drop-down in Edit Form

Hello,

 

i have seen many posts here on the subject of drop-downs but still cannot figure out how to do this. In DataCard14 I have a drop-down box in my New Form(DataCardValue14). The data source is the Events table. Events has a lookup field from the Homes table. I want a value from Homes to prepopulate this drop-down control as the default for the New Form.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
jlarsen81
Level: Powered On

Re: Set default selection for drop-down in Edit Form

Is this like what you are trying to accomplish?

 

dd1.jpg

 

Apparently what I had posted earlier only shows up when you have already inserted the dropdown into the DataCard, replacing the TextInput box, and, have added something into the Items field for the DataCardValue, as shown in the attached picture.

View solution in original post

19 REPLIES 19
Community Support Team
Community Support Team

Re: Set default selection for drop-down in Edit Form

Hi RobRoy,

 

Could you provide more details about your scenario?


Where does the data source “Events” table come from? Is it a custom entity in Common Data Service? How is it configured?
What’s the Home table?

Have you already created a Relationship between Events table and Homes table?


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
RobRoy
Level: Powered On

Re: Set default selection for drop-down in Edit Form

Thank you for your response. My Powerapp is built from a SharePoint Online list. Events is the main table with relationships to three other tables (Homes, Employers, Eras) that are the source of the dropdown controls. When I create a new record I would like specific values from those three tables to already be selected in each dropdown. I tried messing with the Default values based on other posts but nothing changes.

jlarsen81
Level: Powered On

Re: Set default selection for drop-down in Edit Form

I am by no means an expert in PowerApps, but I think if it could work, it would be accomplished in the Items property of your dropdown. Something like this maybe:

DropDown1.Items=Distinct('Events',lookup column title)

DropDown1.Default="desired default item"

This will only work with a list smaller than 500 items because of delegation inablilities, though. And it might not work with a lookup column, but if the data shows in the gallery, it should be available for a dropdown.

RobRoy
Level: Powered On

Re: Set default selection for drop-down in Edit Form

Thank you for responding. My dropdowns are DataCards, and they don't appear to have an Items field. They do have Default fields, but changing this field from Parent.Default does nothing at the DataCardValue level, and changing ThisItem.MyRecordID at the DataCard level also does nothing. I am guessing this is becuase I am looking at the EditForm version, not the NewForm state, but I have no idea how to access that nor if I need to.

 

I really thought this would be as easy as it is in Access.

 

Thanks.

jlarsen81
Level: Powered On

Re: Set default selection for drop-down in Edit Form

I apologize if I'm being presumptuous here, but there should be 2 parts to every DataCard, the DataCardKey, and the DataCardValue. The dropdown should be the DataCardValue part of the DataCard. If you click on the more options button, and scroll down, you should see "the name of your dropdown".Items, this would be the Items field for the dropdown, directly below that should be " ".Default. If your DataCard is unlocked you should be able to edit these fields with the previous replies' statements. It may or may not work, but it's probably worth a try.

The fields you're looking for are circled below:

DataCardValue.jpg

 

RobRoy
Level: Powered On

Re: Set default selection for drop-down in Edit Form

Very interesting. I double-checked for that field you circled and it does not appear:

 

DataCard.jpg

jlarsen81
Level: Powered On

Re: Set default selection for drop-down in Edit Form

Is this like what you are trying to accomplish?

 

dd1.jpg

 

Apparently what I had posted earlier only shows up when you have already inserted the dropdown into the DataCard, replacing the TextInput box, and, have added something into the Items field for the DataCardValue, as shown in the attached picture.

View solution in original post

Community Support Team
Community Support Team

Re: Set default selection for drop-down in Edit Form

Hi RobRoy,

 

My understanding is that you have four lists on SharePoint, the main list Events, and three other lists Homes, Employees, Eras.
On Edit form, you want to specific values from these three tables.


Per my understanding, I would suggest you add connections from PowerApps to all these lists, then add three drop down controls and set the Items property of each drop down to the lists.

e.g. About list Homes, you could set the Items property of Drop down1 control as: Distinct(Homes, Column Name)

 

Please try if this works for you. If I misunderstand you, please feel free correct me.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
RobRoy
Level: Powered On

Re: Set default selection for drop-down in Edit Form

Thanks, everyone! I did have to create new dropdown controls to get the Items option that enabed me to set the default using the Distinct function. I also connected to the individual child tables as suggested but I don't know now if I had to do that. In any event, it finally works.

Helpful resources

Announcements
thirdimage

New Badges

Check it out!

thirdimage

Power Apps 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

Top Solution Authors
Top Kudoed Authors
Users online (5,284)