web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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

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,297 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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard