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 / multi-column lookup fo...
Power Apps
Unanswered

multi-column lookup for SQL source

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I have a field within a form I would like to populate from a SQL table. The value within column (SO#) has multiple lines  associated with it. When I perform a lookup (which pre-populates the field based on input of another, I get just the first line instead of each line that is associated with the number.

 

Example:

 

LookUp('[dbo].[tblarInv]',SONumb=TextInput3_3.Text,InvNumb)

 

 InvNumb                     SONumb

(1)      5678                     12345

(2)       5678                    12345

(3)      5678                     12345

 

Of course each line has unique data. Also is it possible to apply this to a drop-down instead of Text input since it will have multiple lines? 

 

Thanks in advance.

      

Categories:
  • PaulD1 Profile Picture
    2,914 on at

    LookUp returns the first matching record or field if you specify a field (3rd parameter). If you want to return multiple lines you will need a Filter instead.

    As a Filter will return multiple records, you cannot use it as the Text property of a text box (multiple records and text being incompatible data types). Instead you could use a Gallery which will allow you to have repeating text boxes, one for each record. You could also populate other controls that can show multiple values such as DataTables, Dropdowns and Combos.

  • ShadowTech Profile Picture
    on at

    @PaulD1  This is a form and some fields are being populated by SQL and then the form is being submitted into a SharePoint list. I'm trying to Pre-populate as much data from our ERP then the user will submit to our SharePoint.

     

    Basically user enters data into TextInput1 and the other fields (textinput) are pre-populated from the SQL source.

     

    You mentioned a drop down. That would be ideal. How would I go about doing that. Can you provide examples?

     

    Thanks again.

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 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard