This topic is locked

How to add a value after a choice is made?

10/23/2010 5:21:43 PM
PHPRunner General questions
K
karmacomposer author

This may finally be it. I have been reading database table structures and I added a necessary field to all of my tables.
Now, I need one last thing and I think everything will work.
I hard coded the RecruiterID into the CandidateCC candidates for a particular recruiter (in this case, 41)
I set up the database according to this new field that is now shared by all tables.
I logged in as the recruiter and WOULDN'T YOU KNOW IT, IT WORKED!
So, I now have to figure out one thing:
Is the RecruiterID automatically put into the RecruiterID field or do I have to copy the RecruiterID from the RecruiterNames table to the CandidateCC table when a Candidate choose the Recruiter's Name?
If I have to copy it, then the php code has to query the RecruiterNames table based on the Recruiter's Name and get the RecruiterID value, right?
Then it needs to write that ID to the RecruiterID field in the CandidateCC table.
If someone could point me in the right direction (I am going to see how to do it in my book, but if anyone knows the answer faster than I can read/hunt for it, I appreciate the help.
Mike

K
karmacomposer author 10/23/2010

New problem.
Now, the Recruiter can see all the candidates assigned to them via the RecruiterID field, but the Candidate cannot see their own data because I have security pointing to the RecruiterID field and not the CandidateID field for the CandidateCC table. If I re-assign security to point to the CandidateID, then the candidate can see their record, but that candidate DOES NOT show up when the recruiter logs in.
Anyone care to guess why this is and what I can do to make it so that they BOTH work?
Mike

A
ann 10/26/2010

Mike,
unfortunately PHPRunner doesn't support two OwnertID fields for the same page.

As workaround you can create Custom View on the Datasource tables tab and set RecruiterID field as OwnerID for the main table and CandidateID as OwnerID for a view.