function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Abi V 4Abi V 4 

How to get the previous selected value for select list

I have two select list with Months and Quarters Filters and one Action button.
If i select  Months and Quarters value at a time i want to consider recent sleected value
<apex:selectOption itemvalue="Reports" itemLabel="select Report" /> <apex:selectOption itemvalue="1" itemLabel="Test1"/> <apex:selectOption itemvalue="2" itemLabel="Test2"/>
</apex:selectList> I select the value 1 first, how do I retrieve the value of 1 after I choose 2 in visualforce page
VineetKumarVineetKumar
your question is not clear, if you are looking for something like getting the old and new values on the picklist, then that is not possible.
 
Abi V 4Abi V 4
Hi vinnet,
Yeah i want to compare the select list value od old with new.
Thakns for your reply if this is not possible i hope only way i can throw validation rule to select any one filter at a time.
VineetKumarVineetKumar
Yea seems the only way though.

Do mark my answer as best answer if it helped solve your problem
Abi V 4Abi V 4
Is this something can be possible with passing parameter through URL to controller?
VineetKumarVineetKumar
Your value is in the view state, it will get lost in case of any change to the value.
Can you refer your requirement here, perhaps my understanding maybe wrong and there may be some other way for it.