Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
Answered

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

(0) ShareShare
ReportReport
Posted on by 508

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

 

Categories:
  • Verified answer
    Pstork1 Profile Picture
    66,287 Most Valuable Professional on at
    Re: PVA Flow - if value is not found return not found.

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

    image.png

  • VeeLearnMSFT Profile Picture
    508 on at
    Re: PVA Flow - if value is not found return not found.

    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.

  • VeeLearnMSFT Profile Picture
    508 on at
    Re: PVA Flow - if value is not found return not found.

    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

     

  • Verified answer
    Pstork1 Profile Picture
    66,287 Most Valuable Professional on at
    Re: PVA Flow - if value is not found return not found.

    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.

  • VeeLearnMSFT Profile Picture
    508 on at
    Re: PVA Flow - if value is not found return not found.

    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 Profile Picture
    66,287 Most Valuable Professional on at
    Re: PVA Flow - if value is not found return not found.

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Copilot Studio - General

#1
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 25

#1
Pablo Roldan Profile Picture

Pablo Roldan 25

#3
stampcoin Profile Picture

stampcoin 10

Overall leaderboard