Skip to main content

Notifications

Power Platform Community / Forums / General / Power virtual agents r...
General
Answered

Power virtual agents returns to a skipped question at the end - Blank variables

Posted on by 15

Hi everyone,

 

My chatbot is returning to a skipped question at the end of the conversation. After so much struggle, I found out the reason. However, I don't know how to resolve it. 

 

I created an adaptive card at the end to display the results nicely. I noticed that if I have a blank variable in the adaptive card, it returns to that blank variable even though it is a question that has been previously skipped. 

 

I created a sample of the issue below. You see I ended the conversation and the bot still goes back to the question. I don't want to create an adaptive card after every choice question. 

 

Is there a way to circumvent this?

 

Much appreciated. 

 

Paulo 

 

snip.png

Categories:
  • MisterMark Profile Picture
    MisterMark 70 on at
    Re: Power virtual agents returns to a skipped question at the end - Blank variables

    That's fantastic news and a neat solution!

  • Verified answer
    pmota Profile Picture
    pmota 15 on at
    Re: Power virtual agents returns to a skipped question at the end - Blank variables

    @MisterMark ,

     

    I found a solution. I can use a simple "If clause" in the adaptive card JSON statement. Using my example above

     

    {
          type: "TextBlock",
          text: If(Var1="OptionA",Blank(),Var2),
          wrap: true
        }
     
    Thanks for your help. 
     
    Regards,
     
    Paulo
  • pmota Profile Picture
    pmota 15 on at
    Re: Power virtual agents returns to a skipped question at the end - Blank variables

    @MisterMark ,

     

    Thanks for your prompt response. 

     

    Unfortunately, I can't. I need to give a form to the user at the end. It is going to have blank variables inevitably. It is like to ask the user.

     

    1. Would you like to mirror your access from another user - Yes/No

    2. Name of the person you want to mirror your access from.

    3. Are you going to create invoices or to approve invoices?

    4. If approver, select the options (Manager/Director)

     

    Here is the information for your form:

    1. Access Mirror (Yes/No): No

    2. Name of the person you want to mirror your access: Blank

    3. Job role (Creator/Approver): creator

    4. Approval role: Blank

     

    Considering the simple example above, the PVA is going to ask for the name of the person and approval role at the end, which does not make sense. I would need to create an adaptive card for all the combinations to avoid the blank variables. That is what I want to avoid.  

     

    Thanks.

  • MisterMark Profile Picture
    MisterMark 70 on at
    Re: Power virtual agents returns to a skipped question at the end - Blank variables

    Have you tried to just terminate after the selection is made if the chat should end. There are lots of neat options. You can just say Goodbye, Confirmed Success, End with survey. I think that is what I would do to end the chat.

    @pmota let me know if this helps and mark the post solved if it does. I am trying to move up the leaderboard with solutions and win a Microsoft Power Platform Conference free entry.

    MisterMark_0-1692984030264.png

    MisterMark_1-1692984199061.pngMisterMark_2-1692984212252.png

     

     

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

#3
Expiscornovus Profile Picture

Expiscornovus 1,667