cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hxb303
Frequent Visitor

How to not reset a dropdown after closing and reopening the app(in edit mode)

How to not reset a dropdown after closing and re-opening the app? (In edit mode or play mode whichever works but was looking for it working under the edit mode) 
I have a dropdowns with Items =[" ",""Yes","No]; Default=false; Reset= false display mode: edit. It is reseting to the blank " ", I dont know what else to do.

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi@hxb303,

Based on the issue that you mentioned, do you want the Dropdown to display the previously selected when re-open the app?

Could you please share a bit more about the scenario, do you mean that it works in Edit/Play mode but not the time when you reopen the app?

The key is that you should have a target data source where you save your Dropdown selected. For example, you select "Yes" in the Title field which belongs to the first record, at this situation, the ID of this record will be "1". And this is how you save your Dropdown selected.

There is an SP list named 'dropdown' in your scenario, you need to check which record the Dropdown selected belongs to. 

I have a test on my side, please take a try as below.

Set the Items property of the Dropdown as below:

 

dropdown

 

Set the Default property of the Dropdown as below:

 

LookUp(dropdown,ID=1,testdropdown)

 

Note: The 'testdropdown' is my column to store the Dropdown selected value, please replace it with yours.

Best Regards,

Qi

Best Regards,
Qi

View solution in original post

7 REPLIES 7
WarrenBelz
Super User
Super User

@hxb303 ,

Any control will take its Default value when the app is opened. If you want it to display the current field value, then the Default needs to be 

Parent.Default

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

I just want whatever the last value i select from Items:[“”,”Yes”,”No”] before i close the app to appear after I re-open it.  

Parent.Default you told me to use is red underlined in the Default property of the dropdown since I am not using any parent datasource in the items section im guessing, i tried Default=Default which is allowed but doesnt change anything. 

Trying to find if there a way to save the last input in dropdowns in edit mode when closing and reopening the app. No data source.

@hxb303 ,'

With no data source, this is not possible. You have to store the value somewhere.

You could have a separate list with a Yes/No field for each checkbox (you would only need one record) , Patched to the field at OnCheck or OnUncheck, then read and set Variables at App OnStart and Default the controls to the Variable value.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

What checkbox and OnCheck and on OnUncheck? I am talking about dropdowns to save last selected answer (yes no or blank dropdown). I have already changed dropdown Items= dropdown (list i created from sharepoint) but the Default=Default.Parent you said is still underline in red for in the dropdown property

Screen Shot 2020-09-10 at 5.53.00 PM.png

Screen Shot 2020-09-10 at 5.51.26 PM.png

Screen Shot 2020-09-10 at 5.51.14 PM.png

Screen Shot 2020-09-10 at 5.51.35 PM.png   

This is what i have.

So are you are saying i should link this dropdown to a checkbox i create to the On Start App for it to all work ?

@hxb303 ,

Firstly forget about the checkbox - for a drop-down action will be OnChange.

The Parent.Default was in my first post assuming it was bound to a field in a data source and this is now irreverent now you have said it is not the case. 

Please refer to my second post where it needs to be set on a Variable from a list you need to create to store the value. Power Apps has to get the required information from somewhere as closing the app deletes any temporary values not stored permanently.

Hi @hxb303 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

v-qiaqi-msft
Community Support
Community Support

Hi@hxb303,

Based on the issue that you mentioned, do you want the Dropdown to display the previously selected when re-open the app?

Could you please share a bit more about the scenario, do you mean that it works in Edit/Play mode but not the time when you reopen the app?

The key is that you should have a target data source where you save your Dropdown selected. For example, you select "Yes" in the Title field which belongs to the first record, at this situation, the ID of this record will be "1". And this is how you save your Dropdown selected.

There is an SP list named 'dropdown' in your scenario, you need to check which record the Dropdown selected belongs to. 

I have a test on my side, please take a try as below.

Set the Items property of the Dropdown as below:

 

dropdown

 

Set the Default property of the Dropdown as below:

 

LookUp(dropdown,ID=1,testdropdown)

 

Note: The 'testdropdown' is my column to store the Dropdown selected value, please replace it with yours.

Best Regards,

Qi

Best Regards,
Qi

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,554)