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!
Solved! Go to Solution.
Is this like what you are trying to accomplish?
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.
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
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.
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.
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.
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:
Very interesting. I double-checked for that field you circled and it does not appear:
Is this like what you are trying to accomplish?
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.
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
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.
User | Count |
---|---|
222 | |
98 | |
95 | |
55 | |
34 |
User | Count |
---|---|
272 | |
108 | |
106 | |
60 | |
59 |