GlideRecord addQuery comparing a field value to a field value from another table stored in variable

hidde
Tera Contributor

I want to do something simple like this:

 var task = new GlideRecord('pm_project_task')
task.addQuery('top_task',project.number)

 

where project.number is a field from another table. I have queried the entire pm_project_task table and checked manually for a match between top_task and project.number and that works.

Just trying to figure out how to check a field against a variable in addQuery. If this can be solved differently, great.

 

for context the project.number is generated dynamically so I cant do: table > filter the record as needed > right click on the query end >do a copy query> use it in encoded query

thanks in advance.

0 REPLIES 0