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 / Notify function with L...
Power Apps
Unanswered

Notify function with LookUp

(0) ShareShare
ReportReport
Posted on by 34

Hello,

 

I want to Notify user if Lookup does not find a matching value in the Dataverse. So far I have managed to write below code on OnChange event of a txtSearch but I am not sure what is wrong. DelayOutput is set to true 

 

If(
 !IsBlank(""),
 With(
 {
 wRecord: LookUp(
 'Owners',
 'Owner Email' = txtSearch.Value
 )
 }, 
 If(
 IsBlank(wRecord.'Managers-Email'),
 Notify(
 "No matching email found in the tool.",
 NotificationType.Error
 );
 Reset(txtSearch)
 )
 )
)

  

Categories:
  • Rahman1005 Profile Picture
    109 on at

    Hi,

    can you please refer article examples are covered, hope is will helpfull.

    https://www.inogic.com/blog/2018/12/notify-functions-in-canvas-power-app/

     

    Thanks, 

  • aaaaaaaDDD Profile Picture
    34 on at

    How is this even related to my question?

  • aaaaaaaDDD Profile Picture
    34 on at

    Ah, I fixed by removing "!" on line 2

    IsBlank(""),

     

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Hi,

     

    At present this code is not running at all due to your first condition within the If statement, as it will always evaluate to false:

     

    image.png

     

    You should be able to change this to refer to the length of the search text so that it only does the lookup when the search text input has a value in it:

    If(
     Len(txtSearch.Text)>0,
     With(
     {
     wRecord: LookUp(
     'Owners',
     'Owner Email' = txtSearch.Text
     )
     }, 
     If(
     IsBlank(wRecord.'Managers-Email'),
     Notify(
     "No matching email found in the tool.",
     NotificationType.Error
     );
     Reset(txtSearch)
     )
     )
    )

     

    Also it looks like you are referring to txtSearch.Value but I think this should actually be txtSearch.Text if it's an actual text input control.

     

    Try modifying the above code to meet your needs,

    Cheers,

    Sancho

  • aaaaaaaDDD Profile Picture
    34 on at

    Hello,

    Yes, I realized mistake in the formula. I am using PowerApps for Teams and hence I think textbox does not have "Text" property.

    I was expecting the "OnChange" event to be fired when the focus is moved out of the text input however  it is getting fired every time a text is added in the textbox. Any thoughts?

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard