cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VeeLearnMSFT
Helper V
Helper V

PVA Flow - if value is not found return not found.

Currently my flow works well when I pass matching variables but as soon I put in a code that does not match inside of the table it breaks and gives me an error: 

How do I bring in error handling so that it reports back a message saying the CPT Code was not found in the table. 

I tried playing with conditions and playing with Terminate but I just cant get anything to work.  Thanks for reading.

VeeLearnMSFT_1-1651961675371.png

 

 

VeeLearnMSFT_0-1651961608014.png

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

That's close, but use a single string variable in place of the two compose statements. Just initialize it at the top of the flow and then you can set it either in the Yes or the No side, but it will still be the same variable.  Just different values.  Then return the contents of that variable.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Here's a screenshot of the relevant portion from one of mine.  I'll return the string variable varReturn.

image.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

6 REPLIES 6
Pstork1
Dual Super User
Dual Super User

I do this in several of my BOT flows.  Create a string variable to hold the value you want to Return.  Then use a condition at the appropriate point to test whether there is a return value or not.  If Yes, set the variable with that value. If No, set it with *Not Found* or whatever else you want to return.  Then return the contents of the variable.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Can you please walk me through it. Here is what I have now.  Is this close?

 

 

VeeLearnMSFT_2-1651969362288.png

 

VeeLearnMSFT_1-1651969017187.png

 

Pstork1
Dual Super User
Dual Super User

That's close, but use a single string variable in place of the two compose statements. Just initialize it at the top of the flow and then you can set it either in the Yes or the No side, but it will still be the same variable.  Just different values.  Then return the contents of that variable.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Sorry I am still having a hard time with this...is there any way you could post a screenshot...sorry just have a long way to go to learn this...

VeeLearnMSFT_0-1652009498941.png

 

I recreated the flow...this keeps on happening where I think the flow is not working..I re create the entire thing and it works..there must be some bug within the Teams environment.

Here's a screenshot of the relevant portion from one of mine.  I'll return the string variable varReturn.

image.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Canadian Cloud 2022 768x460.png

Register for a free PVA chatbot creation workshop.

Learn how to respond rapidly to your customers and employees at scale, using intelligent conversational chatbots.

Top Solution Authors
Users online (2,962)