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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Wait for more than jus...
Power Automate
Answered

Wait for more than just one text string

(0) ShareShare
ReportReport
Posted on by 133

Good day PAD Community.

 

I'm doing the following. Run a command window, firing into SQLPlus, running a db procedure and then waiting for the procedure to complete, before issuing further actions.

Like So:

CraigSparks37_0-1698401775241.png

My QUESTION is:

Is it possible to specify multiple strings to wait on?

Example: 'PL/SQL procedure successfully completed'  OR 'ERROR on line'

 

When the procedure fails, which it could, I end up in an endless wait.

 

Any and all suggestions would be appreciated.

 

Thanks

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    First of all, can't you just run the SQL procedure via Execute SQL statement action? Using the UI here is not exactly efficient.

     

    If you do absolutely need to use the UI, enable the "Fail with timeout error" toggle on the Wait for text on screen (OCR) action:

    Agnius_0-1698402086326.png

     

    You will then be able to set a timeout value.

     

    Then you can add "On error" options to the action, so that if it times out, certain actions are performed. I would recommend calling a sub-flow that has a different Wait for text on screen (OCR) action or an If text on screen (OCR) condition that checks for a different text. And then continuing the flow run after doing that.

    Agnius_1-1698402255804.png

     

    This would essentially mean that if the first text does not appear, you check for the alternative text and then continue. 

     

    Alternatively, you could use regular expressions and simply pass the two strings like separated by an OR operand like this:

    Agnius_2-1698402346774.png

     

    The | symbol is used as the OR operand in regular expressions. So, you would essentially be waiting for either of the two texts provided.

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

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • CraigSparks37 Profile Picture
    133 on at

    I used the regular expression approach.

    This will applied not only to what I'm doing, but anyone who needs to wait for potential string responses.

     

    Thank you Agnius. 🙂

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 237 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 194

Last 30 days Overall leaderboard