cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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.

Highlighted
Memorable Member
Memorable Member

Re: DropDown Default Value

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

Re: DropDown Default Value

Yes.

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

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

Re: DropDown Default Value

Same result.  Still just chooses first item in dropdown.

Highlighted
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 III
Super User III

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.

Highlighted
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
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,934)