cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Variable initialization

Hi Experts

 

This is tricky one. I have a question which captures a boolean answer from the user . In Yes branch user presented with a question to capture a variable. After that both branches join, where in I'm planning to send the values to Flow action. As I'm sending my bool value + other captured value (which is not available when it is No branch) to flow, the bot jumping suddenly to Yes branch and asking that one question and coming out from branch to pass the information to Flow.

Is this expected behavior? Or am I missing any thing? I guess it is because there is no concept of initialize variable explicitly like how in flow. Am I right? Any suggestions please?

 

Thanks

Srikanth

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Variable initialization

Hi @ansrikanth ,

 

Yes, unfortunately.

But if you need to do a workaround, you can create a generic workflow that receives a unique parameter and inside your workflow, you manage which actions the Power Automate needs to do it.


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Power Virtual Agents course (FREE): https://www.udemy.com/pva-beginners

View solution in original post

5 REPLIES 5
Highlighted
Super User II
Super User II

Re: Variable initialization

Hi @ansrikanth 

 

Could you please share a screen capture of your BOT, so i can understand you scenario better and will try to help you.

 

Regards,

 

 . 

Highlighted
Super User
Super User

Re: Variable initialization

Hi @ansrikanth ,

 

Yes, it's normal because you cannot send empty variables or parameters to Power Automate.

If you have a condition and one of this get another variable, I recommend that you create one workflow per condition, like one flow that sends as input only Boolean option and another workflow that receives the Boolean option + additional variable.


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Power Virtual Agents course (FREE): https://www.udemy.com/pva-beginners
Highlighted
Helper I
Helper I

Re: Variable initialization

Thanks for that @renatoromao . Just hypothetically, if I have 10 conditional branches with 10 different type of variables (for ex: different loan amount types we are expecting from user like Mortgage loan, personal loan, vehical loan, x loan, y ,z  etc etc), I have to create 10 different flows? Irony is the logic is same across all of these flows and that is for ex pushing the information in to CDS.

 

That's not sounding like an elegant approach to me. Do you agree?

 

@DeepakS  here is the screenshot

 

in the above screenshot, if I use varOtherLoanAmount any where further down and the flow will jump back and asks the question "how much you will be paying".  Hope you got the pain point...

 

Thanks 

-Srikanth

Highlighted
Helper I
Helper I

Re: Variable initialization

Screenshot - for some reason previous post ignored my screenshot..Annotation 2020-06-06 235234.png

Highlighted
Super User
Super User

Re: Variable initialization

Hi @ansrikanth ,

 

Yes, unfortunately.

But if you need to do a workaround, you can create a generic workflow that receives a unique parameter and inside your workflow, you manage which actions the Power Automate needs to do it.


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Power Virtual Agents course (FREE): https://www.udemy.com/pva-beginners

View solution in original post

Helpful resources

Announcements
PVA Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

PVA-BotVariablesMulti-Language

PVA Bot Variables, Multi-Language

Check out this Power Virtual Agents-Bot Variables, Multi-Language and working a Solution to learn more

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Top Solution Authors
Users online (7,608)