cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ankit3
Level: Power Up

How to set a variable as Null if the user does not provide any value

Hi,

 

I have made a bot that asks a bunch of questions and then using the variables calls flow to send an email. The problem is that some variables are optional for the user (the chat flow is made like that) and when some variables are not provided, the flow call is executed and the questions are asked again.

 

Is there any way to assign variable a null value?

3 REPLIES 3
renatoromao
Level 8

Re: How to set a variable as Null if the user does not provide any value

Hi @ankit3 ,

 

Can you take some pictures of your scenario?

 

But side your pictures, you can see if this topic help you: https://powerusers.microsoft.com/t5/Power-Virtual-Agents-Forum/Conditition-to-test-a-variable-for-an...

The solution is: "[...] are you trying to handle a return variable from a flow and do a condition in PVA based on that? I had the same issue and I had to add some logic in the flow to set the value of the variable to "NotFound" and then pass that back into the PVA so that the condition had something to select. Yes i know, workaround to fix a simple feature gap but you know... Let's be agile!"

 

Ashish2012
Level 8

Re: How to set a variable as Null if the user does not provide any value

ankit3
Level: Power Up

Re: How to set a variable as Null if the user does not provide any value

Thanks for your reply.

 

Attaching screenshot of the PVA where I'm calling flow. You can see there are around 8 variables. The flow is executed perfectly if all 8 all present but of user chooses not to provide the "CompanyName", the flow is not executed and user is asked to provide "CompanyName" again. What I'm asking is that, is there any way I can identify if a variable is empty and if yes, assign "Null" to it so that flow can be executed?

 

 

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,128)