Where I can find the details of the addCondition method?

ericpan
Kilo Explorer

Hi,

I saw the addCondition method in the GlideRecord page, GlideRecord - ServiceNow Wiki. The method only mentioned one time in an example on the page. I tried to search it but in vain. Where I can find the details of the method?

Regards,

Eric Poon

1 ACCEPTED SOLUTION

And then I say that and here it is in my developer's instance:



GlideQueryCondition

The scoped QueryCondition API provides additional AND or OR conditions that can be added to the current condition, allowing you to build complex queries.



In the case of addCondition(), an implied AND is added.



addCondition(String name, String oper, Object value)

Adds an AND condition to the current condition.


PARAMETER(S):



NameTypeDescription
nameStringThe name of a field.
operString(Optional) The operator for the query. If you do not specify an operator, the condition uses an equals operator.
valueObjectThe value to query on.



RETURN:



TypeDescription
GlideQueryConditionThe query condition.


View solution in original post

7 REPLIES 7

Ken83
Mega Guru

I tried to search the page but could not find the addCondition method on it.


Add condition?   Or addOrCondition()?   Add condition is just addQuery().


And then I say that and here it is in my developer's instance:



GlideQueryCondition

The scoped QueryCondition API provides additional AND or OR conditions that can be added to the current condition, allowing you to build complex queries.



In the case of addCondition(), an implied AND is added.



addCondition(String name, String oper, Object value)

Adds an AND condition to the current condition.


PARAMETER(S):



NameTypeDescription
nameStringThe name of a field.
operString(Optional) The operator for the query. If you do not specify an operator, the condition uses an equals operator.
valueObjectThe value to query on.



RETURN:



TypeDescription
GlideQueryConditionThe query condition.