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 / Pop up Connfirmation w...
Power Apps
Answered

Pop up Connfirmation when clicking on a button.

(0) ShareShare
ReportReport
Posted on by 60

Hello, may I please know how to put a popup confirmation on this code? 

send.png

Code in plaintext:

Office365Outlook.SendEmailV2(ThisItem.MakerEmail,
"Your Loan Application has been approved!",
"Your Application with PO. No.: " & ThisItem.'PO. No.' & " has been approved!",
{Attachments:AddColumns(RenameColumns(AttachmentControl.Attachments,"Value", "ContentBytes"), "@odata.type", "")}
)

Categories:
  • WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    Hi @Neil82 ,

    A Notify banner (at screen top) on this code

    Office365Outlook.SendEmailV2(
     ThisItem.MakerEmail,
     "Your Loan Application has been approved!",
     "Your Application with PO. No.: " & 
     ThisItem.'PO. No.' & 
     " has been approved!",
     {
     Attachments:
     AddColumns(
     RenameColumns(
     AttachmentControl.Attachments,
     "Value", 
     "ContentBytes"
     ), 
     "@odata.type", ""
     )
     }
    );
    Notify(
     "Approval email has been sent to " & ThisItem.MakerEmail,
     NotificationType.Success
    )

     

    Please click Accept as solution 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 Thumbs Up.

  • KrishnaV Profile Picture
    5,023 on at

    Hi @Neil82,

     

    You can use 

    Notify("Your Application with PO. No.: " & ThisItem.'PO. No.' & " has been approved!",NotificationType.Success,1500);

    This will show as a strip on top of the browser. 

     

    I hope this resolved your issue if you see any challenge/need further help let me know I am always happy to help.

     

    Regards,
    Krishna
    If this post helps give a 👍  and if it solved your issue consider Accept it as the solution to help the other members find it more.

     

  • Neil82 Profile Picture
    60 on at

    Hey guys, I was thinking more of something like this:
    popup.png
    But the notify thing is very nice as well so that the user knows that an action has been performed.

  • KrishnaV Profile Picture
    5,023 on at

    Hi @Neil82,

    OnVisible of the screen set this value:

     

    updateContext({varShowFlag:false});

     

    1. Add a rectangle with the screen size and make the rectangle transparent.
    2. Add a label with  a confirmation message and Yes and No button
    3. on yes button onSelect set this formula

     

    Office365Outlook.SendEmailV2(
     ThisItem.MakerEmail,
     "Your Loan Application has been approved!",
     "Your Application with PO. No.: " & 
     ThisItem.'PO. No.' & 
     " has been approved!",
     {
     Attachments:
     AddColumns(
     RenameColumns(
     AttachmentControl.Attachments,
     "Value", 
     "ContentBytes"
     ), 
     "@odata.type", ""
     )
     }
    );​

     

    • Select all those controls to make them a group
    • Now set the visibility of that group to varShowFlag
    • replace the current formula with the below

     

    updateContext({varShowFlag:true});

     

    7. on No click set as below 

     

    updateContext({varShowFlag:false});

     

     

    I hope this resolved your issue if you see any challenge/need further help let me know I am always happy to help.

    Regards,
    Krishna
    If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • KrishnaV Profile Picture
    5,023 on at

    Hi @Neil82,

     

    I just want to followup and I hope you are able to implement popup with the script I provided.

     

    I hope this resolved your issue if you see any challenge/need further help let me know I am always happy to help.

    Regards,
    Krishna
    If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • Neil82 Profile Picture
    60 on at

    Hi, I tried it but I'm getting errors. Here's a picture.

    errormail.png

    I think it's because I made the original button from a gallery?

  • Verified answer
    KrishnaV Profile Picture
    5,023 on at

    Hi @Neil82 ,

     

    Use this on Yes button click

    Collect(colSelRec,First(Filter(SampleList,ID=4)));
    
    Office365Outlook.SendEmailV2(
     User().Email,
     "Your Loan Application has been approved!",
     Concatenate("Your Application with PO. No.: 
     has been approved!", Text(colSelRec.ID))
    );
    
    UpdateContext({varShowConfFlag:false});

    This process has a limitation that you can't attach the list item attachments.

     

    I hope this resolved your issue if you see any challenge/need further help let me know I am always happy to help.

     

    Regards,
    Krishna
    If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

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