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
Highlighted
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.

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
secondImage

Demo-Extravaganza 2020 Winner Announced

Check it out!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (12,047)