Why don't you instead use the job datums to find out the related cartidges. This solution is rather prone to errors if a job name needs to be changed.