In reactive I have a dropdown search widget that displays clients. When selecting a client I display some results witin an aggreate according to the selected client id.
When the user navigates to another screen and then comes pack to the screen with the dropdown search widget I would like the dropdown search to remember the selected client id and display the aggreate with the corresponding result.
UPDATE: The purpose of the desired functionality which I'm trying to achieve is that ones the user returns to the page he/she shouldn't have to re-select the former value (inside the dropdown search widget) in order to view the same result set inside the aggerate. I want the screen to remember the value he/she has selected and the corresponding result set.
Thanks
Hi Mohammad,
I am sending to you a working example OML. It will be easier for you to see how it works.
First, make sure you have the client variable filled in as the Starting Selection and that you have the handler for the OnChanged event:
Then on the handler, you update the value of the client variable:
And that's it.
Kind Regards,João
Hi Mohammad Mirza,
Instead of using a local variable to hold the option selected by the user (the client id) in your case, use a client variable.
While the local variable resets to its original value when you navigate to a screen, the client variable holds the data until the user signs out of the app or when the platform signs out the user automatically.
Hi João
This is exactly what I have done. However I've ran into problem with assigning the value to the dropdown search widget.
I have tried to assign the client variable inside the Initialized event of the dropdown search widget (on the DropdownWidgetId parameter) and I have also tried to do it on the "On After Fetch" of the GetClients aggregates. But it does not seem to be the correct procedure.
You are probably overwriting the value in one of these places.
The client variable will hold the value of your selection, so you don't need to manipulate it on the OnInitialize nor on the OnAfterFetch.
I have no problem saving the selected value inside a client variable. The problem is when the user navigates to another screen and then returns, then I need to somehow assign the saved value inside client variable to the dropdown search widget and have the dropdown search widget display the same result that the user had selected to begin with.
Thanks for the detailed explanation. That solved my issue.
Now it's clear, it solved me here too, thank you
Hi,Can you provide the OML for the same ?Thanks
Hi Siddharth Vyas
Unfortunately I'm not able to share the OML due to company policy.
No issues.
Hello @Mohammad Mirza
In dropdown search you can use starting selection properties to show pre selected items
Thanks Regards
Mohd Rizwan
Hi Mohd Rizwan
I'm not sure I understand your suggestion. The startingselection property takes a list. What I have is the selected value of the dropdown search which I have saved inside a client variable.
I have attached the oml for your refrence please look into it i have created a sample for what you are looking.
Demo Link: Screen
Hi Rizwan
Thanks for the OML, however it is giving me errors, even after updating it.
Nevertheless my issue has already been solved my João Marques.