My initial screen is a list screen. One of the fields is a drop down list. This drop down list is where the user will select which page to go to. It starts with Select (which takes you nowhere).
When the user picks an option and hits save on that screen, it returns to the initial screen and the drop down list resets to have Select showing. If the user hits cancel on that screen, it does NOT reset the drop down list to Select.
Here is the OnSelect for the Save.
// Shows overlay on save
UpdateContext({OverlayVisible: true});
If(SubmitForm(EditSetupNotesPage),
Refresh(CustomerMaster_v3);
Navigate(CustomerList, ScreenTransition.Fade),
// hides overlay on error
UpdateContext({OverlayVisible: false}))
Here's the OnSelect for the Cancel:
Refresh(CustomerMaster_v3); Back(ScreenTransition.Fade)
What do I need to do to get the dropdown to reset? I am attaching a screenshot that shows you how it returns back when I hit cancel.
Like this?
That gives an error. Says I don't need the comma after Navigate(CustomerList, ScreenTransition.Fade),
I did this and it still didn't work
UpdateContext({OverlayVisible: true});
Refresh(CustomerMaster_v3);
Navigate(CustomerList, ScreenTransition.Fade)
I'm about to head out for the day. Can we try it tomorrow?
Hi @mistysmith ,
Where do you put your "Save" button and "Cancel" button? Within the Gallery?
Do you want to reset the Dropdown list within your Gallery?
Further, do you set up a column (e.g. Text Type column) in your data source to store the Dropdown list selected value?
Based on the needs that you mentioned, I think a global variable could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:
Set the OnSelect property of the "Cancel" button to following:
Set(IsReset, false);Set(IsReset, true); // Add this formula
Refresh(CustomerMaster_v3);
Back(ScreenTransition.Fade)
Set the Reset property of the Dropdown box in the Gallery to following:
IsReset
Set the Default property of the Dropdown box in the Gallery to following:
ThisItem.'SelectedPage Column'
Note: The 'SelectedPage Column' represents the Text Type column in your data source, to store the Dropdown List selected value when you click "Save" button.
On your side, you could consider set the OnSuccess property of the EditSetupNotesPage form to following:
Patch( // Update the Dropdown list selected value back to your data source when you submit your form data successfully
'Data Source',
EditSetupNotesPage.LastSubmit,
{
'SelectedPage Column': DropdownListBox.Selected.Value
}
)
Please consider take a try with above solution, check if the issue is solved.
Best regards,
Is true the Reset property of the Dropdown ?
Yes, Reset is set to true.
Hi @mistysmith ,
Have you taken a try with the solution I provided above? Based on the needs that you mentioned, I think a global variable could achieve your needs.
Please consider take a try with the solution I provided above, then check if the issue is fixed.
Best regards,
I got pulled to work on something different yesterday.
I'm not sure why I need to do anything with the Save part since it resets the drop down correctly. I want it to go back to Select, which is the first item in the list.
User | Count |
---|---|
178 | |
112 | |
88 | |
44 | |
42 |
User | Count |
---|---|
224 | |
114 | |
114 | |
71 | |
67 |