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 / change textbox based o...
Power Apps
Answered

change textbox based on lookup result

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

What I have:

I have 2 textboxes on a screen. i'm trying to change the values in the textboxes based on the result of the lookup text

Looking into sql server table:

if  RBK_FVP.Text = LOOKUP_EMAIL_ADDRESS in the sql table then

make  RBK_FVP.Text= RBK_RSVP.Text

 

else

RBK_FVP.Text = RBK_FVP.Text

 

 

being fired off from a onChange event in another textbox :

If(!IsBlank(
LookUp(
t_escalation_email_exceptions,
RBK_FVP.Text = LOOKUP_EMAIL_ADDRESS
)),
 RBK_FVP.Text= RBK_RSVP.Text,
 RBK_FVP.Text = RBK_FVP.Text)

 

Thanks

dave

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    In PowerApps you cannot assign values to controls like you are trying.  PowerApps derives its property values based on Formulas.  It is very much like Excel in that cells have formulas in them that reference other cells and formula.

     

    So, for what you need, you will be focused on the Default property of the RBK_FVP control.

    Unfortunately what you are asking for creates a circular reference, so you will need to employ an behavioral action and a variable for this.

     

    Set the formula in the OnChange action of the control to:

    UpdateContext({newVal: 
     If(
     LookUp(t_escalation_email_exceptions, LOOKUP_EMAIL_ADDRESS=Self.Text, true), 
     RBK_RSVP.Text, 
     Blank()
     )
    })

    Then change your Default property of the textinput control to:

    If(!IsBlank(newVal), newVal)

     

    I would also recommend turning the DelayOutput property to true so that your app doesn't fire off a lot of lookups as you type in the control.

     

    I hope this is helpful for you.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    worked great randy

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard