Currently, I am retrieving two values from a JSON object. I immediately use one of them and then no longer need it. To simplify things, I decide to pass only a single value to the next page.
The Issue:
The first time I select each option from the dropdown, it works perfectly fine. However, if I deselect an option and then choose it again, the field displays undefined
.
My Solution:
I am considering creating an external variable to store the 'old' value. When I change the selection, the previous value will be stored in the external variable. The challenge lies at the beginning where the value is initially null
.
Does anyone have a solution for this issue? Or perhaps a better approach to solving the problem altogether?