Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Using a Dropdown to perform a lookup

(0) ShareShare
ReportReport
Posted on by 206

Hello,

I have a dropdown box on my powerapp which contains a list of Surnames from a Sharepoint list named Drivers.  I would like to add some text labels to the sharepoint list which will lookup the surname n the dropdown list and then populate the label with the relevant information from the same sharepoint list e.g. Forename.

 

This sounds like such a simple thing to do but i'm struggling a bit, any help would be much appreciated.  I've tried using 'LookUp(Drivers,(Surname)=Text(Dropdown1.Selected).Forename)' in the text label but it doesn't work and doesn't seem to like the '='


Thanks

Categories:
  • Station1901 Profile Picture
    Station1901 206 on at
    Re: Using a Dropdown to perform a lookup

    Brilliant, that works exactly how I want it o.  Thankyou

  • Verified answer
    Talha_Dar Profile Picture
    Talha_Dar 870 on at
    Re: Using a Dropdown to perform a lookup

    Hi @Station1901,

     

    Please try using the following code and see if it resolves the issue:

     

     

    LookUp(Drivers,Surname=Dropdown1.Selected.// Add The Column Name That is Used To Render Values in The DropDown, Forename)

     

     

    If you found my answer helpful, please consider giving it a thumbs-up or a like. Your feedback is greatly appreciated!

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Station1901 Profile Picture
    Station1901 206 on at
    Re: Using a Dropdown to perform a lookup

    Thanks but now it states that 'value'isnt valid and isnt recognised??

  • Rajkumar_404 Profile Picture
    Rajkumar_404 557 on at
    Re: Using a Dropdown to perform a lookup

    Try this

    LookUp(Drivers, Surname = Text(Dropdown1.Selected.Value), Forename)

    Thanks!

  • Station1901 Profile Picture
    Station1901 206 on at
    Re: Using a Dropdown to perform a lookup

    Ive tried all of these options though I still get the same error, a red line underneath the = the error reads - Incompatible types for comparison these types can't be compared : Text Error

  • Rajkumar_404 Profile Picture
    Rajkumar_404 557 on at
    Re: Using a Dropdown to perform a lookup

    Hi,

    Try this

    LookUp(Drivers, Surname = Dropdown1.Selected.Value, Forename)

    Or

    LookUp(Drivers, Surname = Dropdown1.Selected.Value).Forename

    Thanks!

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

  • SanmeshG Profile Picture
    SanmeshG 1,938 on at
    Re: Using a Dropdown to perform a lookup

    Hi @Station1901 ,

     

    What is the error that you are getting?

     

    Please try,

     

    LookUp(Drivers,Surname=Dropdown1.Selected.Value).'ColumnName'

     

    Here ColumnName refers to the name of the column in your SP list which you want to display/retrieve.

     

    If this helps , please give this a thumbs up and accept this as a solution.

     

    Thanks,

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard