Filter HR Cases with reference field 'Assigned To' in HR tasks

amielalcala
Kilo Sage

Hi,

 

I need to filter the HR Case (sn_hr_core_case) table where a Task from Task (task) table is Assigned To = Me.

 

I have tried adding a filter "Parent => Task Fields" then "Parent > Assigned To" but nothing shows up on the table list view.

 

amielalcala_0-1704983070112.png

 

I validate the list through My Requests page in ESC Portal (/esc?id=my_requests) and the objective is to display the same HR requests from portal to the HR Case table list view.

 

Screenshot below are the records that I need to display on the HR Case table.

amielalcala_1-1704983194633.png

 

Any help with the filter query for the list view is greatly appreciated.

 

Thanks!

 

1 ACCEPTED SOLUTION

JulianLemcke
Kilo Sage

@amielalcala :

The challenge is what @Ankur Bawiskar said, that these are different tables and you do have one of the following options:


1. You create a list of the HR Cases with the following filter and add the "parent" field:

JulianLemcke_0-1704990195341.png

The downside here is, that you won't see all of the "HR Cases fields", but only the Number. You can do the same within the HR Agent Workspace, but there you would only be able to add the "default parent" (task table) fields, and not the HR Case fields

 

2. You could also create a report, with a "related list condition" - that would satisfy your requirement. However, you would then need to add this report either to a dashboard or run it always:

JulianLemcke_1-1704990297351.png


Unfortunately, there is no "easy" way for your ask. You could also go down the route of create a "database view" - but that might be an overkill here.

Cheers,
Julian

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@amielalcala 

you want to apply filter to HR case or HR Task

your requirement is not clear.

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

@Ankur Bawiskar  Apologies for that, I need to apply the filter to HR Case table. The requirement is to get the query from the My Requests page and apply the filter to the HR Case table. The expected behavior is that the list view should show all HR cases with HR tasks that are assigned to me.

@amielalcala 

both tables are different HR case and HR task

you cannot show HR tasks on HR case list

But you can show HR Case on HR Task list by applying this condition

Have report on HR Task table and type as List and apply condition

Assigned to Me and then show HR Case (Parent) in the list

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

JulianLemcke
Kilo Sage

@amielalcala :

The challenge is what @Ankur Bawiskar said, that these are different tables and you do have one of the following options:


1. You create a list of the HR Cases with the following filter and add the "parent" field:

JulianLemcke_0-1704990195341.png

The downside here is, that you won't see all of the "HR Cases fields", but only the Number. You can do the same within the HR Agent Workspace, but there you would only be able to add the "default parent" (task table) fields, and not the HR Case fields

 

2. You could also create a report, with a "related list condition" - that would satisfy your requirement. However, you would then need to add this report either to a dashboard or run it always:

JulianLemcke_1-1704990297351.png


Unfortunately, there is no "easy" way for your ask. You could also go down the route of create a "database view" - but that might be an overkill here.

Cheers,
Julian