web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Issues with default se...
Power Apps
Answered

Issues with default selected items on combo box

(0) ShareShare
ReportReport
Posted on by 129

So, I have a main table, in this main table called tasks, in this main table I have a column named Employee, that is a LookUp type column, doing a lookup to a table called Employees, in this table I store, EmployeeName and other information on the employee.

 

Now, I have a combo box that im looking to do a patch with, this combo box need to be able to set its default selected item, based on a label, so for example if the label says "John Doe", I need the combo box to select the record for John Doe, I currently have this on the combo box

 

Items: Choices([@tasks].Employee)

DisplayFields: Value

DefaultSelectedItems: LookUp(employees, lblEmployee.Text = EmployeeName)

But it does not seem to select anything for its default, is there a way to do this?

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,791 Most Valuable Professional on at

    Hi @FGRODRIGUEZ ,

    Your DefaultSelectedItems should be

    {Value: lblEmployee.Text}

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • QQY Profile Picture
    on at

    hi @FGRODRIGUEZ 

     

    Try this

     

    First(LookUp(employees, lblEmployee.Text = EmployeeName))

  • FGRODRIGUEZ Profile Picture
    129 on at

    This one gives the appearance of working, as it shows the correct name on the box, but when you actually complete the patch, the record is created with that column as blank instead of including the record for the employee

  • FGRODRIGUEZ Profile Picture
    129 on at

    This one indicates that the formula has some errors and says the data type is record.

  • WarrenBelz Profile Picture
    154,791 Most Valuable Professional on at

    @FGRODRIGUEZ ,

    What type of field are you writing back to ?

  • Verified answer
    FGRODRIGUEZ Profile Picture
    129 on at

    I found the solution, in this case you need to setup the defaultselectitems as

     

    Filter(Choices([@mainTable].Employee), Value = lblEmployee.Text)

     

    and the items property of the combo box to Choices([@mainTable].Employee)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard