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 / Copilot Studio / How to clear a global ...
Copilot Studio
Unanswered

How to clear a global variable value from test bot that is persisting between sessions?

(1) ShareShare
ReportReport
Posted on by 4
Hello,

I'm building my first Custom Copilot in Copilot studio and a few weeks ago I created a global variable usr_PostCode and clicked the 'Allow to carry between sessions' box.

I used the test bot and added a random postcode.

I then decided that I didn't want the global variable to persist between sessions so I deselected the box.  But every single time, I use the test bot it remembers the random postcode I entered a couple of weeks ago.  If I set the postcode to something else, the next time I restart the bot - it thinks it has that old postcode again.

It seems to not be an issue in the published bot but only in the test bot within Copilot studio - but it's been driving me around the bend.   How do I reset that variable value so that it is not remembered between sessions?
 
Things I've tried:
  • Renaming the variable - this worked but I don't want to do this permanently as a) this is the best name and b) I've a tonne of adaptive cards that would need updating.
  • Running the "Clear variable values" action beforehand - this doesn't work.
  • Switching the 'carry between sessions flag' on and off again - didn't work.
  • Trying a different browser - same issue, it must be account-specific and not stored in local storage.
  • Switching the 'carry between sessions flag' on and then running the clear variables action and then switching it off again - didn't work, I wasn't optimistic, just desperate.
  • Before the UI changed I thought there was somewhere you could see the value of variables as you were testing.  I can't find it now but I think it was showing blank even though it wasn't. 
Any ideas?  It feels like such an insignificant thing to get stuck on but that seems to be a bit of a theme!
Thanks


Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,022 Most Valuable Professional on at
    Use PowerFX function in the Set Variable action to set the value to null. That will clear the variable.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Copilot Studio

#1
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 130 Super User 2026 Season 1

#2
Valantis Profile Picture

Valantis 122

#3
chiaraalina Profile Picture

chiaraalina 33 Super User 2026 Season 1

Last 30 days Overall leaderboard