NQ operator not returning results in EncodedQuery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 03:49 AM
Hi All,
I have a below table structure Parent table and m2m table for customers having reference to parent table.
Parent table : u_serte
Relationship Table : u_m2m_companies_sertu
Now I have all records on Parent table and there are few records which have one to many relationships with m2m table, ex of relationship is one to many where records on parent table can have multiple customers mapped to them.
If a customer is there then we have a field customer restricted which is set to true and if no customer then this is set to false.
Now when I go to raise a request and select a customer , so now the result should show all the records from parent table where customer is there and all the records where there is no customer.
I have written below query:
"u_tem=SR Day^u_active=true^JOINu_serte.sys_id=u_m2m_companies_sertu.u_serte!u_company=" + comp + "^NQ" + "u_active=true^u_tem_type=SR Day^u_customer_restricted=false" + "^EQ";
No matter what order I try , records returned are always those records where there is a relationship established with customer. Both encoded queries work fine when executed individually but the moment I add OR condition non customer records are never returned.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 05:28 AM
By screenshot I meant the screenshot of the field the tables involved the the expected result
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 10:11 AM
Schema map would that be helpful ?