cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tdupton Helper II
Helper II

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 Memorable Member
Memorable Member

Re: DropDown Default Value

Yes you are right. Does your datasource Employee have UnitID column?
tdupton Helper II
Helper II

Re: DropDown Default Value

Yes.

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

Sienna Memorable Member
Memorable Member

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.
Highlighted
tdupton Helper II
Helper II

Re: DropDown Default Value

Same result.  Still just chooses first item in dropdown.

Sienna Memorable Member
Memorable Member

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 Helper II
Helper II

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,755)