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 / lookup function and as...
Power Apps
Answered

lookup function and assign textbox values from lookup result

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a table called Accounts_b  -  3 fields   AccountName, AccountNumber, Account Description

 

I have a button that will execute the lookup function below.

Once i have a record. I need to assign 3 textboxes on my screen. the values from those fields in the result  set.

LookUp(Accounts_b, AccountName = txt_Account.Text)

 

is this possible without  using table object or Gallery ?

 

 

Dave

 

Categories:
  • eka24 Profile Picture
    20,925 on at

    For the Account Number:

    LookUp(Accounts_b, AccountName = txt_Account.Text, AccountNumber)

     

    For Account Description

    LookUp(Accounts_b, AccountName = txt_Account.Text, AccountDescription)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @eka24 

    How do assign a textbox the value from the lookup ?  from the "button".

     

    Unless you mean...assigning the textbox "default" property this function ?

     

    I thought maybe there would be a way to assign the textbox defaults from the search button via a variable from the  Lookup function ?

     

     

     

    Dave

  • eka24 Profile Picture
    20,925 on at

    Do you intend to show the results of the LookUp on the button instead of default of Textbox?

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    eka24,

    No, I want to show the results of the lookup in the three textboxes.

    I guess a better question is.

    Can the lookup function, return more than one column result.

    and if the it can, ...can I assign a variable to each column result.

     

     

     

    Dave+

     

  • eka24 Profile Picture
    20,925 on at

    The LookUp will return a column in the the approach you are asking. 

    With the variable, restate the formula I stated earlier example Onselect of a Button;

     

    For the Account Number:

    Set(varNo,LookUp(Accounts_b, AccountName = txt_Account.Text, AccountNumber))

     

    You could also return a record as well. However with your scenario, replicate the formula stated above.

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Returning a record would be ideal state, then maybe I could assign a variable to any field ?

     

    dave

  • Verified answer
    eka24 Profile Picture
    20,925 on at

    In that case Onselect;

    Set(varAccount,LookUp(Accounts_b, AccountName = txt_Account.Text))

     

    Then in the Default of the Textboxes:

    varAccount.AccountDescripion

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard