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 Apps / Send user a message "R...
Power Apps
Unanswered

Send user a message "Record not found"

(0) ShareShare
ReportReport
Posted on by 233

I have a button in PowerApps, onselect "ClearCollect(colList, 'Execute_SQL'.Run(Value(TextInput.Text)))

The user types in a value in TextInput box.

 

It runs my PowerAutomate Flow and returns data to the screen. It works; however, I need to generate a message to the screen when a user enters a record that does not exist in the database. My flow works but generates a failed status message in PowerAutomate. And the user sees nothing from within PowerApps. 

 

I need to tell them why it's failing and stop the failed status messages in my flow. I'm not sure if I need to do this inside of PowerAutomate or if I can do it in PowerApps.

Thoughts?

Thanks you!

Categories:
  • VaidasG Profile Picture
    469 on at

    Hi @kbashaw,

     

    In Power Automate you need to "Configure Run After" following the step where you try to fetch data.

    VaidasG_0-1681494546906.png

     

    Select "has failed" as acceptable condition

    VaidasG_1-1681494634275.png

     

    In the following logic of your cloud flow capture the "failure" message and return to you app... 😅

     

    Regards
    VaidasG

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

  • kbashaw Profile Picture
    233 on at

    I'm a little confused if I need to do this after Execute Stored Procedure or the Response block. It branches off to a Yes box and a No box. What do I put in those boxes?

    sql_pic.PNG
  • VaidasG Profile Picture
    469 on at

    @kbashaw 

     

    Have your condition following Execute block, for a condition "check" use Execute block STATUS (200 success, 4xx failure)...
    Both YES/NO branches should have Response - one for success another for failure. Consume your response message in canvas app, as per your requirement 🙂

     

    Regards
    VaidasG

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

  • kbashaw Profile Picture
    233 on at

    I'm sorry, it's so hard to follow along. This is what I have now. I added it as a condition to run after has failed. But I don't know what else to fill in.

    sql_pic2.PNG
  • kbashaw Profile Picture
    233 on at

    I could really use some help on figuring out that last step.

  • VaidasG Profile Picture
    469 on at

    Hi @kbashaw,

     

    I'll do my best, can you screenshot me what you currently have...

  • kbashaw Profile Picture
    233 on at

    I haven't done anything more with it since I uploaded the pictures two weeks ago. sql_pic2.PNG

  • VaidasG Profile Picture
    469 on at

    thx, can you give me the body content of your sql step, when it fails?

  • kbashaw Profile Picture
    233 on at

    This is what shows up in the body when it fails:

    {
      "ResultSets": {},
      "OutputParameters": {}
    }
  • VaidasG Profile Picture
    469 on at

    can you screenshot? Is there a status code, etc.?

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 Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard