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 / Creating a Lookup in E...
Power Apps
Answered

Creating a Lookup in Edit Form using Combobox selection

(1) ShareShare
ReportReport
Posted on by 86

I am attempting to build a parts ordering app, When the user orders the parts I want to auto populate a couple of fields in the form based on a location code. I have tried to create a Lookup() function that will pull data from a reference table based on a selection from a Combo box that references the same table. DataCardValue15 is a dropdown selection on the "order" table that is a lookup from the the TLC Garage table. 

 

LookUp('TLC Garage Locations', 'TLC Garage Location Code' = DataCardValue15.Selected, 'Manager Email')

 

I keep getting an error stating that Incompatible Types for comparison Text; Record. 

 

ToddVH_0-1687543258813.png

ToddVH_1-1687543296009.png

 

 

Categories:
  • turnerj3 Profile Picture
    2,039 on at

    Try this:

    LookUp('TLC Garage Locations', 'TLC Garage Location Code' = Text(DataCardValue15.Selected.'Manager Email'))

  • npeterq Profile Picture
    10 on at

    Try 

     

    " Lookup('TLC Garage Locations', 'TLC Garage Location Code' = Text(DataCardValue15.Selected), 'Manager Email') "

     

    By using the Text() function, the value of 'DataCardValue15.Selected' will be converted to text, since it can't compare text to record.

  • ToddVH Profile Picture
    86 on at

    Thank you for the suggestion, but that did not work either.  

     

    The error is in the value for DataCardValue15.  If I take that out and manually enter a value, the equation works. So I need a method to convert the DataCardValue15 that is a selection in a combobox to a value that can be compared. 

  • turnerj3 Profile Picture
    2,039 on at

    Add a label that uses Text(DataCard15.Selected). If you get the correct value in the label then use Label.Text in your Lookup and set the label Visible to false.

  • ToddVH Profile Picture
    86 on at

    Tried both.  The Text(DataCard15.Selected) and Text(DataCard15.SelectedItems) give me an error saying the function Text has some invalid arguements. 

  • turnerj3 Profile Picture
    2,039 on at

    Put a period behind Selected and see if it will give you the option to autopopulate Manager Email

  • madlad Profile Picture
    2,637 Moderator on at

    When referencing the combobox, try using DataCardValue15.Selected.Value instead of dataCardValue15.selected

  • Verified answer
    ToddVH Profile Picture
    86 on at

    Solved it.  Thank you for the suggestion, it was close, needed to autopopulate the TLC Garage Code after the selected,

     

    LookUp('TLC Garage Locations', 'TLC Garage Location Code' = Text(DataCardValue15.Selected.'TLC Garage Location Code'), 'Manager Email')

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard