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 / Create a Drop-down opt...
Power Apps
Answered

Create a Drop-down option with button option to show page and Log off option

(0) ShareShare
ReportReport
Posted on by 986

Hi everyone,

I had a requirement like in most of the websites we have an option at the top right corner of our screen besides profile image a drop-down appears (like snippet) which gives us some option like 'View Profile', 'Settings', 'Log out'.

Sidhant_02_0-1672825571558.png

So can we implement this type of drop-down in power apps, if so please explain the steps to do so in reply or any alternative if present? I am using Microsoft 365 connector to get the details of the current logged in user.
Also once a user signs in how to build the logoff/sign-out functionality which takes the user back to the login screen.
For log out functionality, as we cannot use exit function in a gallery option I created a new paged ExitScreen Popup in which I have created a pop-up box with 2 options Yes and No. On No I am navigating back to Home Screen and on Yes->OnSelect: Exit(). But the application is not exiting on click of Yes.

Sidhant_02_0-1672829953888.png

 





Regards,

Sidhant Dorge.

Categories:
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Sidhant_02 ,

     

    For the first question, this so called "dropdown" can also be considered as a popup. You will be able to control the visibility using a context variable which is updated by OnSelect of a "View Profile" button or any icons/custom images:

    UpdateContext({viewProfile:!viewProfile})

    vjefferni_0-1672887800031.png

     

    For the second question, Exit() function will not close the app when editing in studio, please see in official doc:

    Exit function in Power Apps - Power Platform | Microsoft Learn

     

    Best regards,

  • Sidhant_02 Profile Picture
    986 on at

    Hi v-jefferni,

    Thanks for the response I was able to implement the drop down functionality in my sample app using the context variable the steps were as follows:

    1. Added a icon on one of my page
    2. OnSelect of the new icon added the expression that you had given for context variable
    3. Then added a container: In which added 2 text Home and Exit. On Home option navigate to Home screen
    4. Set the visibility of the container to the context variable.

    Sidhant_02_2-1672895897405.png

     

     

    Sidhant_02_3-1672895924662.png

     



    So if I want to create a menu item in the browse gallery itself like:

    Sidhant_02_0-1672894349065.png

    Sidhant_02_1-1672894371711.png

    Then it that case as Gallery does not allow to navigate to a page I will have to create another and in that page I will have to create a pop-up window (this will increase the number of pages).

     

     


    Exit: It exits the current app and leaves the user signed in. The user is returned to the list of apps.

    So using exit it should exit the current app because using Exit(true) logs out of the Microsoft account.

    And how to add a cursor on the text when hovering over the text?

    If this post was useful, please leave a like and if possible do accept the solution.

    Screenshot 2023-01-05 104956.png
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Sidhant_02 ,

     

    You can use Buttons than Text Labels if you need cursor come up when hovering over the control. There are various behaviors and appearance of a Button to serve your purpose.

     

    Best regards,

  • Sidhant_02 Profile Picture
    986 on at

    Hi @v-jefferni ,
    Thanks, I will have a look at it.

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard