I'm trying to find a way to automate the selection of cost rate tables and would welcome some pointers.

I have created a task based custom field that uses a lookup table of job roles (e.g. Developer, Tester, Trainer). Depending on the job role selected I would like to change the cost rate table for the assignment.

Please can someone show me how I can read a value from a text custom field and set a value for an assignment field?