GlideRecord query condition "does not equal" for related list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2021 02:37 PM
I have a related list on a contract record, and I would like to add a condition to the filter so that it does not show records where the status is Processing - Pre Hire
Here is the code from the relationship record:
Yet when I check the related list on the contract form, I do not see the status != "Processing - Pre Hire" in the filter. What am I missing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2021 02:50 PM
The easiest way to confirm that your query is correct is to right-click on the Processing... status in the related list and choose Show Matching, so that now it is in the filter (in the affirmative). Right click on that last element of the filter and choose Copy Query. Paste that into your relationship definition and verify that the field name and value (case and space-sensitive) is the same as what you are using in your addQuery line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2021 07:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2021 08:06 AM
The point of pasting the query is to make sure the same field names and expected values are used in your addQuery lines. We know contract and parent.sys_id are good since you are presumably seeing the record(s) for the correct Contract in the related list. The screen shot above confirms that 'status' is the correct field name to use for the second addQuery line, but the value is still in question since you changed it to = a different one. If you really want everything except processing pre hire, then copy the value from the pasted query into the addQuery value that you are testing to confirm that there aren't any typos or a difference in spaces or special characters, then delete/comment out the pasted query.