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 / Button Click with Pass...
Power Apps
Answered

Button Click with Password - Canvas App

(0) ShareShare
ReportReport
Posted on by 538

Team,

 

I would like to lock the button click with password so that while clicking the button it will prompt for password and then it can be navigated to any page.

 

How to achieve this.

 

 

Categories:
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @AVTS 

    Please follow these steps,

     

    1. Create a new screen called ValidationScreen

    2. Set the button's OnSelect to,

    Navigate(Validationscreen)

    3. In validation screen, insert a textinput to enter password, a button to confirm and a button to cancel.

    4. Set the textinput's Mode to password.

    5. Set the Submit button's OnSelect:

    If(LookUp(data source,email=User().Email,password)=TextInput1.Text,
     Navigate(Screen3),
     Notify("you've entered wrong password!",NotificationType.Warning)
    )

    6. Set the Cancel button's OnSelect: Back()

     

    Hope this helps!

     

  • AVTS Profile Picture
    538 on at

    Thank you @CNT for your quick response.

     

    Instead of validation screen is it possible to design in such way that POP-UP box should appear inwhich i shoud be able to enter the password and it should to be navigate the correct screen . And if it is incorrect password then its should fail.

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @AVTS Do yo need this Pop-Up just in 1 Screen or more?

  • AVTS Profile Picture
    538 on at

    Ok. Say i have two screen as follows,

     

    Mainscreen ( Is having only one button and name is submit)

    Datascreen

     

    Requirement is .

     

    smal box should open with password field onclick submit button and based on password validation its should pass in to Data screen.

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @AVTS PowerApps does not have a built in Pop-up control. The easiest way is how I have said before - to have a separate validation screen.

    There is another probability but it requires more work though,

     

    1. In the OnSelect of the submit (Mainscreen) put this code: Set(gblValiadtionVisble, true) 

    2. Create a New Scrollable screen

    CNT_0-1622393947532.png

     

    3. Inside this new screen, you will see a Canvas and a DataCard insid. You can make the Canvas to fill the whole screen add a Password textinput and a button as I had shown before. 

    CNT_1-1622394234237.png

    CNT_2-1622394323372.png

     

    4. Set the Visible property of the Canvas to gblValiadtionVisble. In the OnSelect of the Submit you can check for the Password as before and then Set(gblValiadtionVisble, false) and either navigate to Datascreen (if password is correct) or just remain in the same screen (if password is incorrect).

     

    5. Important step: Cut this Canvas and paste it into your main screen. After this you can delete the New Screen (we won't need it anymore).

     

    Hope this helps!

     

  • AVTS Profile Picture
    538 on at

    Thanks. In this case Canvas is visible in the mainscreen. what i need is based onclick this box should open for password entry and redirection.

     

    Microsoft support team have a look this requirement and find solution...

  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @AVTS In the OnVisible of the screen put Set(gblValiadtionVisble, false) then you'll see it only when you click the button.

    Hope this helps!

  • AVTS Profile Picture
    538 on at

    Thanks it worked. Some how.

     

    But i think microsoft should come up with built in Pop-up control.

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @AVTS Glad to help!

     

    Please remember to give a 👍 and accept the solution as it will help others in the future.

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 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard