How to query field to currency that shows 0 amount? It seems normal query not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2022 02:59 AM
How to query field to currency that shows 0 amount? It seems normal query not working.
I have 605 total or recods. 506 records containts u_total is not zero. So I'm expecting to have 99 records that contract 0 u_total value. Here's my script, I want to query all records that has 0 value to u_total field but always showing 0 result. Pls help, thank you.
Script showing 99 records that u_total field is zero (not working)
var gr=new GlideRecord('custom_table');
gr.addQuery('u_total','=','0');
gr.query();
gs.info(gr.getRowCount());
Output: 0
Script showing 506 records that u_total field is not zero (works fine)
var gr=new GlideRecord('custom_table');
gr.addQuery('u_total','!=','0');
gr.query();
gs.info(gr.getRowCount());
Output: 506
- Labels:
-
Search
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2022 02:37 AM
Hello Jmea,
Just wanted to check with you, if the my above response answered your question. If yes, then please do close this thread/question by marking the appropriate response as correct.
If you still need any further help or guidance on this then please update those on this question.
Thanks