Filter on State = 'Closed Complete' shows other states with same value

AryanJha
Tera Contributor

 

Hi Community,

I was working on something and encountered an issue on the User Task table. When applying a filter like:

 

Active = true  
AND  
State = Closed Complete

The expectation is that only records with "Closed Complete" as the state should appear. However, I'm seeing records with Closed, Resolved, and On Hold states as well.

I checked the sys_choice table, and I noticed that all of these states (Closed, Resolved, On Hold, and Closed Complete) have the same backend value (value = 3).

This explains why the filter is including all these states — because from a backend perspective, they share the same value.

Interestingly, I checked the same on my PDI (Personal Developer Instance) and the behavior is exactly the same there too.

My question is:

  • Is this a glitch or limitation in ServiceNow's platform?

  • Is there a recommended way to filter specifically by the label "Closed Complete" and not include other states with the same backend value?

Looking forward to your insights.

Thanks!

3 REPLIES 3

TejasSN_LogicX
Tera Contributor

This isn’t a glitch.

Assign a unique backend value to each state (recommended for clarity).

 

TejasSN_LogicX_0-1760352156786.png

 

 

Ankur Bawiskar
Tera Patron
Tera Patron

@AryanJha 

it seems to me that it's a custom table.

if yes then the developer who created the choice values should assign Unique Choice values for those choice labels.

if this is for OOTB table then which table is this? share screenshots.

💡 If my response helped, please mark it as correct ✔️ and close the thread 🔒 — this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Dhananjay Pawar
Kilo Sage

 

Yes, applying a list view filter in ServiceNow fetches records from the server-side. When you filter a list, the system builds a query (often an encoded query string) that is sent to the database on the server to retrieve only the records that match your criteria. 

 

  • Server-side processing: The filtering logic is not handled in your browser. Instead, it is processed on the ServiceNow server, which queries the database to return the results.

  • Query generation: The filter you apply is translated into a query string, which is then executed on the server.

  • Efficiency: This server-side approach ensures that only the necessary data is fetched and sent to the client, making the process efficient, especially for large tables.

 

As Task table hold the records of multiple child tables query will be applied on Task table with 'state=3' and based on query it will show all the matching records.

 

Hope this helps.

 

Thanks,

Dhananjay.