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

Re: DropDown Default Value

The datacard doesn't have a value property...the control does.  I listed that in the first post (it's set to unit table).  The dropdown is populating correctly with all units...the issue is I can't pass the UnitID from the Employee table and select the correct Unit in the Unit dropdown.

 

It has to be something simple that I'm missing...this is basic functionality.

Sienna
Level 10

Re: DropDown Default Value

Yes you are right. Does your datasource Employee have UnitID column?
tdupton
Level: Powered On

Re: DropDown Default Value

Yes.

First(Filter('[dbo].[Units]',UnitID=ThisItem.UnitID)).UnitName

Sienna
Level 10

Re: DropDown Default Value

Ok.. try to change ThisItem for Datacard name... I’m not a fan of datacards but I believe this will work. Try to use intelisearch when typing. It should give you accesible option.
tdupton
Level: Powered On

Re: DropDown Default Value

Same result.  Still just chooses first item in dropdown.

Sienna
Level 10

Re: DropDown Default Value

Then I’m sorry. Like I said I’m not a fan of datacard. Maybe one more try
First(Filter('[dbo].[Units]',UnitID=First(Filter(EmployeeTable, UnitID=desiredUnitIDhere)).UnitID)).UnitName
Super User
Super User

Re: DropDown Default Value

This sounds strange. My inclination is to use this syntax:

Lookup('[dbo].[Units]',UnitID=ThisItem.UnitID).UnitName


However, the formula that you wrote originally, and the formula beneath should equally work:

First(Filter('[dbo].[Units]',UnitID=ThisItem.UnitID)).UnitName


I suggest that you add a label to the same card and set the Text property to ThisItem.UnitID. When you do that, does the UnitID return the value that you expect for the record? To help diagnose this issue, I think it would be a good step to confirm that.

tdupton
Level: Powered On

Re: DropDown Default Value

Thanks, everyone.  As it turns out, the UnitID value was returning blank.  After some troubleshooting, it was a weird error while converting from a SQL view to a table.  Nevertheless, my original syntax worked once I actually got data from the source.Smiley LOL

 

Sorry for the confusion.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 283 members 4,973 guests
Please welcome our newest community members: