How to write contains in a query?

Rithvik2
Tera Contributor

I have created a related list in the problem record like below screenshot...

It was working fine, but I need some modifications.. based on below logic.. I am comparing whether there is any similar short description is existed or not

but here I need to just check contains because everything will not match right?

and also one more point is.. based on that query I am getting self record under related list.. that I need to exclude.

find_real_file.png

1 ACCEPTED SOLUTION

Try with the below single query

current.addEncodedQuery('sys_id!='+parent.getValue('sys_id')+'^descriptionLIKE'+parent.description)

View solution in original post

7 REPLIES 7

Sai Kumar B
Mega Sage
Mega Sage

@Rithvik 

Try the below

current.addQuery('descriptionLIKE' , parent.description);

 

@Sai Kumar 

One more query, please help..

Self record also showing in related list.. I need to exclude that as well..

Try with the below single query

current.addEncodedQuery('sys_id!='+parent.getValue('sys_id')+'^descriptionLIKE'+parent.description)