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 / Context Variables not ...
Power Apps
Answered

Context Variables not working

(1) ShareShare
ReportReport
Posted on by 173

Anyone else having issues with context variables not working? I am trying to reset text input, default dates, toggles none of them are firing either on visible or on select of a button. Pretty straight forward something like this:

 

Button1.Onselect - UpdateContext({cleartext:""})

Textinput1.default - cleartext

Textinput1.reset = true

 

Similar for the dates and toggles only imagine they are set to false and teh date is something like Today() + 1

 

None of these are working.

 

 

Categories:
I have the same question (0)
  • Verified answer
    Brian Dang Profile Picture
    3,976 on at

    I'm still on v2.0.662 and all is well. You need to change TextInput1.Reset to a variable that can change from true back to false. One easy way to do this is to set TextInput1.Reset to:

    Button1.Pressed

    OR set the Button's OnSelect property to a context variable that goes true-then-false:

    UpdateContext({cleartext:""});
    UpdateContext({resettext:true});
    UpdateContext({resettext:false})

    and set TextInput1.Reset to:

     

    resettext

     

    Let me know how it goes.

  • Verified answer
    Eric McKinney Profile Picture
    173 on at

    I appreciate your response

     

    That second option is what i was on, but i wasn't flipping the flags to false and then true, i was just flipping them to true.

     

    So that helped.

     

    The .IsPressed doesnt seem to be an option

     

    Again second option gave me what I needed so i thank you.

  • Brian Dang Profile Picture
    3,976 on at
    @emckinney81 wrote:

     

    The .IsPressed doesnt seem to be an option


     

    Ohh--it's just Button1.Pressed

  • Eric McKinney Profile Picture
    173 on at

    That doesnt work for me either

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 494

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
11manish Profile Picture

11manish 323

Last 30 days Overall leaderboard