Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

integerタイプの項目の値が空の場合の初期値には自動で0が入力されますでしょうか?

Fagi
Tera Contributor

コミュニティの皆様

いつもお世話になっております。

私はGlideReocrdの抽出条件の設定でintegerタイプの項目の値が0のレコードをフィルタリングしたいです。

検証のため、integerタイプの項目が空のレコードを用意しました。

抽出条件を下記のように設定しましたが、integerの値が空のレコードもフィルタリングされてしまいました。

gr.addQuery('integer', '!=', 0);

integerタイプの項目の値が空の場合は0が初期値として自動で入れられているということでしょうか?

 

1 ACCEPTED SOLUTION

Hi @Fagi ,

 

No. It will keep it as empty only. Please check is there default value added as 0 for integer type field at dictionary level.

 

Thanks,

Sagar Pagar

 

Thanks,

Sagar Pagar

The world works with ServiceNow

View solution in original post

3 REPLIES 3

Sagar Pagar
Tera Patron

Hi @Fagi,

 

You can try with

gr.addEncodedQuery('integerISNOTEMPTY); // integer should be field name

 

or

gr.addQuery('integer', "!=", ""); // integer should be field name

 

Thanks,

Sagar Pagar

The world works with ServiceNow

Fagi
Tera Contributor

Thank you  for your response;

If the value of an integer type item is empty, is 0 automatically entered as the initial value?

Hi @Fagi ,

 

No. It will keep it as empty only. Please check is there default value added as 0 for integer type field at dictionary level.

 

Thanks,

Sagar Pagar

 

Thanks,

Sagar Pagar

The world works with ServiceNow