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

Notifications

Announcements

Community site session details

Community site session details

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

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
    153,034 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
    153,034 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard