cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
RoccoB
Level: Powered On

Let code wait for User Input Dialog Control Component

Is there a way to let my code wait for User input e.g. 

 

Case: I have a Save-button in my app. Before saving my data I first want to open a Confirmation Dialog ('Save?  Yes/No). 

I was happy to find the standard Powerapps Dialog Component 

https://powerapps.microsoft.com/en-us/blog/powerapps-ten-reusable-components/

So far i am able to OpenClose the DialogBox and determine which button is pushed ("Ok" or "Cancel") by adding label with Dialog.SelectedButton.Label. 

But I cannot figure out how to let my IF (Dialog.SelectedButton.Label="Ok", SaveData) code wait for user input. It now acts on the current value in stead of using the value the user is yet to choose. 

 

Note : an alternative is building a confirmation dialog myself and putting code behind both buttons (OnSelect Ok-button : SaveData) and OnSelect of Cancel-button: Reset data. My question is more related to how to use the standard component distributed by MS.

 

 

1 REPLY 1
jhall
Level 8

Re: Let code wait for User Input Dialog Control Component

Just FYI, that control is not "standard" at all.  It's one of the new customizable components that can be added.

I haven't looked at this specific control, but if you can edit the OnSelect for that control's "OK" button (or whatever you changed the name to be) then it is best to do your save there.  That's the best way to do it.

An alternative would of course to have a Timer that has it's Start event = to whatever value gets returned/set when the Dialog button is pressed, but that's a little convoluted.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 56 members 4,230 guests
Please welcome our newest community members: