Writing a script that is not able to pick data for the right person
I have a layout in which there is a tab control panel in which each panel shows different categories of data recorded for each person/record. I am trying to write a script and assign it to a button in one of the tabs of tab control panel. The script is meant to check the eligibility of that person based on his designation, level of expertise and some other criteria. I have written a script to perform this job. But, the script takes and shows the data only for the last record/person no matter for which person I try to call it. I want the script to pick the data of the person/record from which I am calling the script via the button.
I have been trying to do it for so long but I am not able to figure out how to do make the script pick the right person's data from the database, I have even tried sending the required person's ID to the script through button. But nothing is working. Any help will be really appreciated.