You need to sign in to do that
Don't have an account?

How to display two tables and compare
Any idea on how to display two tables on a vf page and compare each row of the two tables and display the output as matched or not matched on click of a button ?In the second table there should be a flag column that should be updated with true or false if any of the rows from two table match..
I think we can easily achieve it by using Custom Controller along with Wrapper Class. I tried below example, it works well on page load (not on button click).
Here I am using two objects, Employee and Student. I am matching Student table Name with Employee Table and displaying TRUE id Name exists in Employee table.
I have two questions here:
Beow is the sample code:
VF Page
Controller Please let me know if this make sense or you still want to match rows on button click then we can try something else.
Thanks,
Rajneesh Ranjan
Thanks for your help. This is very close to the requirement.
However I still have a doubt. Suppose Employee object has two instance: First Name and Last Name. Similarly Student object has two instances: First Name and Last Name.
Now if for a student record both first name and last name match with Employee record then it should display as True.
Suppose if Employee name is Subhasini Bhosal. Student names are Subhasini Bhosal, Subhasini Bhosal1, Subhasini Bhosal2, then Only for Student record Subhasini Bhosal it should show as true.
Hope you got my point.