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 Apps
Answered

MessageBox

(2) ShareShare
ReportReport
Posted on by 987

Good morning:

 

Is there a way to pop up a message box asking for input (for a variable)?

 

Thank you.

Categories:
  • Verified answer
    CarlosFigueira Profile Picture
    Microsoft Employee on at

    Not really - the ability to show pop ups to the user (both to just present text and to request input) isn't part of the platform. Please create a new entry in the PowerApps Ideas Board if you feel that this feature is important.

     

    You can, however, simulate a pop-up by "drawing" your pop-up on top of the screen (i.e., a Rectangle shape, a text box to indicate the caption, a text input for the user to enter the value, and a button to confirm the data entry), and set the Visible of those controls to a variable (variables default to false). When you want to show the dialog, you would set that variable to true. Notice that this wouldn't be a modal dialog, so you would need to make the dialog cover the whole screen to prevent the user from interacting with other controls while the dialog is showing.

     

    Here's a more detailed example of how this can be accomplish. For simplicity sake, I'm drawing the dialog not on top of the "trigger" button:

    DialogBox1.png

     

    And setting the following properties:

     

    Button1.Text: "Click to open input box"
    Button1.OnSelect: UpdateContext({variableDefault:" "});UpdateContext({showDialog:true,variableDefault:""})
    TextBox1.Text: "Value entered: " & variable
    Rectangle1.Visible: showDialog
    TextBox2.Visible: showDialog
    TextBox2.Text: "Enter the value:"
    TextInput1.Visible: showDialog
    TextInput1.Default: variableDefault
    ButtonOK.Visible: showDialog
    ButtonOK.OnSelect: UpdateContext({showDialog:false,variable:TextInput1.Text})
    ButtonCancel.Visible: showDialog
    ButtonCancel.OnSelect: UpdateContext({showDialog:false})

    When clicking the first button, it changes the value of the 'variableDefault' variable to clear the value in the text input from the dialog, and then setting the 'showDialog' to true. When the cancel button is pressed, it only hides the dialog, but when the OK button is pressed, then it also updates the variable value with the text from the input.

  • audrieFCT Profile Picture
    987 on at

    I will give that a try! Thank you!

  • rgruian Profile Picture
    Microsoft Employee on at

    We have added this idea/request to our backlog, and we will try to address it in the upcoming releases. Thanks!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Crude but it works.  I have set the DisplayMode to Disabled for my controls when the 'dialog box' is visible:

     

    If(showDialog = false,DisplayMode.Edit,DisplayMode.Disabled)

     

    I also had to Update the context variable when the screen On Visible event occurs as my controls were remaining disabled otherwise:

     

    UpdateContext({variableDefault:" "});UpdateContext({showDialog:false,variableDefault:" "})

     

    It's hard to believe basic functionality like Dialog / Message / Input boxes were not included as 'out of the box' features.

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard