How to check 0/null in addQuery for ''Currency' type field?

Pranshu3
Tera Expert

I have a currency type field in pm_project table. On GlideRecord of this table, I would like to check null/0 value on the currency field.

Could you please help?

1 ACCEPTED SOLUTION

Pranshu3
Tera Expert

Hi,

Thanks for the suggestions, I was looking for value check in addQuery of GlideRecord. Below simple code worked fine:

var projectGR = new GlideRecord('pm_project');
projectGR.addQuery('cost','!=','0'); //check Total Planned Cost
projectGR.query();

Here, cost(Total planned cost) is the Currency field.

View solution in original post

5 REPLIES 5

Pranshu3
Tera Expert

Hi,

Thanks for the suggestions, I was looking for value check in addQuery of GlideRecord. Below simple code worked fine:

var projectGR = new GlideRecord('pm_project');
projectGR.addQuery('cost','!=','0'); //check Total Planned Cost
projectGR.query();

Here, cost(Total planned cost) is the Currency field.