web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / PVA Flow - if value is...
Copilot Studio
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:
I have the same question (0)
  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    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.

  • VeeLearnMSFT Profile Picture
    508 on at

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

     

     

    VeeLearnMSFT_2-1651969362288.png

     

    VeeLearnMSFT_1-1651969017187.png

     

  • Verified answer
    Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    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

    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

     

  • VeeLearnMSFT Profile Picture
    508 on at

    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.

  • Verified answer
    Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

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

    image.png

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 261 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 198 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard