- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2022 09:54 PM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2022 10:40 PM
Try with the below single query
current.addEncodedQuery('sys_id!='+parent.getValue('sys_id')+'^descriptionLIKE'+parent.description)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2022 09:59 PM
use like below
current.addEncodedQuery("short_descriptionLIKE"+parent.description);
or
current.addQuery('short_description','CONTAINS',parent.description);
Thanks & Regards,
Vasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2022 10:20 PM
I need to exclude self record in related list as well... can you help me with that query?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2022 02:23 AM
You meant request raised by current logged in user?
Thanks & Regards,
Vasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2022 10:00 PM
Hi Rithvik,
You can use indexOf instead of Contains in an if condition and return as true based on your requirement.
OR
For example,
var v=[" Europe","England"];
if(v.contains("Europe"));
Mark it helpful and correct
Thanks
Anand