Skip to main content

Notifications

Topic Creation & Management
Answered

Global variable - availability

Posted on by 58

Hi.

 

Waiting with bated breath here for global variables to be available in May. It was originally April but pushed out to May - here's hoping. There really is no workaround for these.

Any news ? Anyone ?

 

https://docs.microsoft.com/en-us/power-platform-release-plan/2020wave1/power-virtual-agents/use-global-variables-across-topics-within-bot

 

Categories:
  • Verified answer
    dougmaloney Profile Picture
    dougmaloney 58 on at
    Re: Global variable - availability

    I raised a product defect and the above issues are now fixed. There is one outstanding issue still under investigation - the variables widget in the PVA authoring console displays multiple versions of the same variable.

  • dougmaloney Profile Picture
    dougmaloney 58 on at
    Re: Global variable - availability

    In addition to the above, I've established that :

    • Setting a global boolean variable from an action does not work - the variable can not be tested for true/false or passed to another action
    • Attempting to pass a previously set global boolean variable to a subsequent action fails. The action is never called (The PA action run history does not show any activity) and the 'bot craps out. 
    • On one occasion this global boolean variable showed up as shown in the image below from within the topic that defined it - spaces at the front of the variable name and all options greyed out.
    • A workaround solution to the whole issue is to use global String variables set to "True"/"False".

    spaces.png

      

     

  • dougmaloney Profile Picture
    dougmaloney 58 on at
    Re: Global variable - availability

    @CleberM @renatoromao Global variables doesn't work reliably.

     

    My observation & guess is that any PA action which attempts to return a value to a global variable does not do so reliably, and subsequent evaluations and tests of that variable do not work as expected.

     

    I have a scenario where in one PVA topic I call a PA action which sets a boolean global variable to true as it returns.

    In a later topic, this variable is tested with a condition for true/any other conditions.

     

    The branch for "any other conditions" always executes.

     

    I expanded the condition to include a check for false, so it now checks for true/false/any other conditions (I considered that maybe the variable is not set at all) and added messages to display the value of the boolean, before the branch and after each branch execution.

     

    Now, the 'any other conditions branch' is still always taken, even though the message displayed AFTER the branch is that the boolean is set to True. See attached.

     

    n.b. The widget to display variable values displays multiple values for variables - the variable in question always shows = True.

     

    not working.png

  • renatoromao Profile Picture
    renatoromao 6,459 on at
    Re: Global variable - availability

    It's strange because your workflow returns value to the variable.

     

    @CleberM  Do you know anything about it?

  • dougmaloney Profile Picture
    dougmaloney 58 on at
    Re: Global variable - availability

    @renatoromao hi - yes I did - several times over.

     

    it is very strange - I have reproduced the issue 5 times and was about to send a video screen capture to demonstrate and the issue just went away.

     

    i just reproduced it again. here's the demo ...

    https://www.loom.com/share/607b308d9bfb41cd97d83d2be0b90196

     

     

  • renatoromao Profile Picture
    renatoromao 6,459 on at
    Re: Global variable - availability

    @dougmaloney ,

     

    Did you try to delete the message inside the "Show a message" card and insert it again?

    Because maybe the issue was after the updates inside the variable (like name or something like that)

  • dougmaloney Profile Picture
    dougmaloney 58 on at
    Re: Global variable - availability

    @renatoromao @RezaDorrani 

     

    very pleased that this has been released. I am experiencing some weirdness with bot variables though....

     

    I have a PA action within a topic which returns 4 variables - one of them is set to "Bot - any topic can access". When I try to access this value later in another topic by displaying it in a message or passing it to another PA action, I get some strange behaviour :

     

    • The variable shows as "x Undefined" in the message block - even though I have checked and double checked to select the right one.
    • The PA action fails
    • The variable list/helper in the bottom left hand side of screen shows the variable listed more than once.

    PVA.png

  • renatoromao Profile Picture
    renatoromao 6,459 on at
    Re: Global variable - availability

    Really nice @CleberM !! 🙂

     

    I tested here and works well.
    https://www.linkedin.com/posts/renatoromao_mtac-powervirtualagents-pva-activity-6671550956947169280-EQIP

  • Verified answer
    CleberM Profile Picture
    CleberM on at
    Re: Global variable - availability

    Hey @dougmaloney ,

     

    We just released Global Variables (named Bot variables in PVA). Fresh out of the oven!

     

    You can see the documentation here: https://docs.microsoft.com/en-us/power-virtual-agents/authoring-variables-bot. You should see it right away if you create a brand new bot.

     

    Let us know what you think! 

    cc: @renatoromao  @RezaDorrani 

     

  • renatoromao Profile Picture
    renatoromao 6,459 on at
    Re: Global variable - availability

    I saw or heard (I don't remember) Microsoft employees explaining that in the next weeks will be released. (It's not a promise, but we are hoping a lot of this feature)

    But COVID-19 impacted a lot of deliveries. (like Reza says) 

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
renatoromao Profile Picture

renatoromao 6,459

#2
Pstork1 Profile Picture

Pstork1 1,968

#3
Expiscornovus Profile Picture

Expiscornovus 1,673

Featured topics