The CreatorCon Call for Content is officially open! Get started here.

Wrong "state" field label shown in list report in group by in task table

Angel Jimenez
Tera Contributor

We are experiencing a problematic situation when it comes to report using "state" field from "task" table. I want to know if someone has experienced similar use case and knows how to deal with it?

 

Use case:

We have a list report in the task_sla table, to track information from SLAs assigned to HR Cases (sn_hr_core_case). As you know task_sla table is general and have SLA information from all "task" child tables in the system. In this use case we are interested in the HR Cases (sn_hr_core_case), so we have built a report in the task_sla that contains a filter to only show HR Cases task type records in the report. In this report we need to group by the state of the HR Case linked with SLA, and for that purpose we are using the "group by" option in the report and selecting "task.state".

AngelJimenez_1-1758274283677.png

 

Problem:

Problem comes when we noticed that the label that is being used by servicenow in the report group by result, does not match with the values that the "state" field can have in the HR Case table. Some screenshots following to show the problem.

  • Result of the group by in the report. We see that the label used by servicenow is "Deferred" while the real state of the HR Cases record is "Ready":

AngelJimenez_0-1758285554462.png

 

 

  • Choices available for state field for HR Cases child type in task parent table, shows that the is no "Deferred" option for HR Cases:

AngelJimenez_3-1758274884466.png

 

  • Looking for all state choices in task table with value "10" (the value that has "Ready" state for HR Cases) we see that "Deferred" state is for other child table (Demand):

AngelJimenez_4-1758274983517.png

 

Reason:

The reason for this misleading label display is that both choices "Ready" from HR Case table and "Deferred" from Demand table  (both child tables of parent Task table) is that both choices has 10 as value, and ServiceNow seems to be choosing one of them to show the label in the group by option in the report.

 

Question to community:

I don't know the reason why ServiceNow is "by default" choosing "Deferred" choice, when using group by in the report, even if we have filter the data to only show HR Case records.

Is there a way to avoid this to happen, so that in the group by result it is shown "Ready" instead of "Deferred"??

 

 

 

1 ACCEPTED SOLUTION

sizzleMcFace
Giga Guru

Hi Angel,

This is a known issue. You are correct that it occurs when choice values from other tables extending the Task table share the same value. You are also correct that filter conditions on the data do not impact how choice values are evaluated in the Group By.

 

Depending on your exact requirements, there are some workarounds:

1. You can create a database view that joins the "task_sla" table with the "sn_hr_core_case" table. Building the report on this view will ensure that only the states from the target table are included, excluding entries from related sibling tables.

 

2. You can also create report directly on the "sn_hr_core_case" table and use Related List Conditions to filter on related Task SLAs.

View solution in original post

3 REPLIES 3

sizzleMcFace
Giga Guru

Hi Angel,

This is a known issue. You are correct that it occurs when choice values from other tables extending the Task table share the same value. You are also correct that filter conditions on the data do not impact how choice values are evaluated in the Group By.

 

Depending on your exact requirements, there are some workarounds:

1. You can create a database view that joins the "task_sla" table with the "sn_hr_core_case" table. Building the report on this view will ensure that only the states from the target table are included, excluding entries from related sibling tables.

 

2. You can also create report directly on the "sn_hr_core_case" table and use Related List Conditions to filter on related Task SLAs.

Hello! Thanks a lot for your feedback and workaround proposals!

Definitely those solutions can work, but that will require for us to rebuild a lot of reports in our dashboards. If there is no other option we will do it but... I was looking for maybe if there is some way to configure that ServiceNow pick the right choice field depending on the table you use in the filter

I can only tell you that we came across the same issue, did research, opened a case to SN and no solution was found apart from the workarounds I mentioned. This "issue" is simply accepted by ServiceNow, "works as designed".