Skip to main content
Community site session details

Community site session details

Session Id : g8Png7u4ByDelDf7QpxS/R
Power Apps - Building Power Apps
Suggested answer

Get Popup Alert window to show

Like (0) ShareShare
ReportReport
Posted on 14 Feb 2025 20:18:40 by 30
Hi there,
 
I am having issues getting a pop up to work the way I want it to.
 
I have a New Client form - when 'save' is clicked - I want it to check if the first name & last name OR the address already exist. If not, save, if so, display a popup that let's the user know this is a duplicate record.
 
This is my code: (it works - if the client doesn't exist, the new record is created, and if the client does exist, no record is created - but the notification never pops up)
 
  If(IsBlank(LookUp('Food Bank Clients', 'Last Name' = txtClientLastName.Text && FirstName = txtClientFirstName.Text || Address = txtAddress.Text , 'Last Name')),
    SubmitForm(frmClientNew),
    Set(varShowDuplicateRecordPU, true)
    ;
 
Thanks!
Amber
Categories:
  • AH-22100006-0 Profile Picture
    30 on 14 Feb 2025 at 22:43:14
    Get Popup Alert window to show
    Hi SpongYe,
     
    That was how I originally had my code - when I couldn't get the notify() function to work, I created a pop up.
     
    It's like that last 'false' portion of the statement never executes.
    But a duplicate record is never created...
    I'm confused LOL
     
     
    And WarrenBelz, it doesn't like the bracket before the ||  I don't think?
     
    Amber
     
  • Suggested answer
    SpongYe Profile Picture
    5,580 Super User 2025 Season 1 on 14 Feb 2025 at 20:48:25
    Get Popup Alert window to show
    Hi @AH-22100006-0
     
    Try this:
    If(
        IsBlank(
            LookUp('Food Bank Clients', ('Last Name' = txtClientLastName.Text && FirstName = txtClientFirstName.Text) || Address = txtAddress.Text)
        ),
        SubmitForm(frmClientNew),
        Notify("This is a duplicate record.", NotificationType.Error)
    );
    
    Use the Notify function to notify the user in the app. If this works it means that the varShowDuplicateRecordPU is not in the correct order or effected in someway to not show.
  • WarrenBelz Profile Picture
    148,811 Most Valuable Professional on 14 Feb 2025 at 20:48:07
    Get Popup Alert window to show
    Maybe some bracketing needed
    If(
       IsBlank(
          LookUp(
             'Food Bank Clients', 
             (
                'Last Name' = txtClientLastName.Text && 
                FirstName = txtClientFirstName.Text
             ) || 
             Address = txtAddress.Text
          ).'Last Name'
       ),
       SubmitForm(frmClientNew),
       Set(
          varShowDuplicateRecordPU, 
          true
       )
    );
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1

Loading complete