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
ChinnoyChinnoy 

how to display data in table after selecting a picklist value

Hi,
i need to get the data from the selected picklist..

the picklist is to have 5 records, if i selected 1 record from the piclist in the visual force page the cases object data is to mbe shown which is assigned to that contact.

can anyone help me on this?

veda Hebbarveda Hebbar
Hi Venkat,

You can do using below steps:
1. On change of picklist value call action funtion via it will call controller method(I hope you are using apex controller for VF page and picklist you are displaying Contact record[Id,value])
2. In controller method query cases related to selected contact.
3. rerender the section where you want to display the related case list.

Hope it will help you. Please let me know if you need more information.

Thanks,
Vedashri
Vasani ParthVasani Parth
Venkat - One way to do this would be to use partial-page refreshes in Visualforce.Put both fields in the same column and use the "rendered" attribute to dynamically show/hide the field using an if-statement. Then you set up an AJAX onchange event handler for the somefield__c field using the actionSupport tag. This will basically listen for that field to change then refresh the table on the page. Each time this is refreshed, your if statements will be re-evaluated and result in showing one of the two fields in that column.

Please mark this as the best answer if this helps