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

Notifications

Announcements

Community site session details

Community site session details

Session Id :

Understanding the Confirm Function in Canvas Power Apps

Ram Prakash Duraisamy Profile Picture Ram Prakash Duraisamy 2,287

 Introduction:


In this blog we will see how Confirm Function works in Canvas Power Apps.

Implementation Steps:

  • Open https://make.powerapps.com



  • Select Apps and Click New App and Select Start with a Page design

  • Select Blank Canvas App and Click Create



  • Once Page Opened, Verify the below PreRequisites

  • Click Settings, select Support and make sure it is in Latest Version




  • Once Selected Click Reload + apply version

  • Save the App with Name



  • Now Click Settings and Enable Modern Controls and themes

  • Once App Loaded add a button 

  • On Select of Button Write below Code

    • Confirm("Confirm Button Popup")


  • Now Add below Code
    • Set(getSelectedOption,Confirm("Confirm Button Popup"));

  • Add a label to form and provide Text as "getSelectedOption"

    • Now when user selects Confirm you will get response as True 
    • If User selects cancel you will get response as False

  • Now Try below code for Title and SubTitle
    • Set(getSelectedOption,Confirm("Confirm Button Popup",{Title:"Header Title",Subtitle:"Sub Title"}));



  • Now Try below code to update Confirm and Cancel Button text
    • Set(getSelectedOption,Confirm("Confirm Button Popup",{Title:"Header Title",Subtitle:"Sub Title",ConfirmButton:"Ok",CancelButton:"Ignore"}));



  • Now try below Code​​​​​​​
    • If(Confirm("Confirm Button Popup",{Title:"Header Title",Subtitle:"Sub Title",ConfirmButton:"Ok",CancelButton:"Ignore"}),Notify("Confirmed"),Notify("Cancelled"));

      Based on selection it will show Popup if you Click Ok it will Notify as Confirmed else Cancelled

​​​​​​​Conclusion:

Going further we don't want to spend much time in Creating Popup :) by having simple command we can achieve this.

This was originally posted here.

Comments

*This post is locked for comments