Skip to main content

Notifications

Copilot Studio - General
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:
  • Pstork1 Profile Picture
    Pstork1 64,703 on at
    How to clear a global variable value from test bot that is persisting between sessions?
    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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,304

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard