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
thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,662)