Override Reference Qualifier using a field from the child table

adilbelahbib
Kilo Expert

Hello everyone,

I'm trying to override the reference qualifier of the 'Parent' field (its type is 'Reference') in the case table (in the Customer Services application).

Apparently, I can only apply filters on fields that are created in the Task table and not the ones that I created in the 'Case' table.

Here are some screenshot to emphasize what I'm trying to say.

The field I'm trying to apply the filter on is 'u_case_type', which is a field that I created, and it's located in the case table (customer service application).

find_real_file.png

This doesn't work, I get all the records on the 'Parent' field and not only those having case type = global.

And when I try another field such as 'short_description', it works.

find_real_file.png

I hope that you can provide me some help.

Thank you.

1 ACCEPTED SOLUTION

I was able to reproduce this using the problem table. My reference qualifier override is:



sys_class_name=problem^u_problem_type=Global



and it still showed all records despite this query showing the correct records in the list. Here's why...



the Parent field points to "task". Task knows nothing about your fields on the sub-tables (like problem, or customer service case) so the reference qualifier cannot filter on those unknown fields. Same reason you cannot report on those when you use Task as the base table.



If you REALLY wanted to do this right, you should create a new parent field that points to your table, not task and then you can query against fields on that table.



I should have remembered this because I've run in to it before on my apps.


View solution in original post

11 REPLIES 11

Chuck Tomasi
Tera Patron

Before I use any reference qualifier, I like to build a list filter using that and then copy the query as a basis for my ref qual.



Have you tried going to the case list and building a filter where u_case_type=Global? Without knowing what type of field u_case_type is, I suspect the field type could be your issue.


Thanks for your answer,


Yes I have the same habit as you, and I used I filter and the copied the query.


As I said, what I noticed is that the override works well when the query contains fields from the Task table, and it doesn't when using Case fields.


Hi Adil,



I'm sorry, I didn't get the point about overrides not working from Case fields. If you are using fields from the case table, then you don't need an override. There's nothing to override. The whole point of them is to "override" settings from the base table (e.g. task.state or task.cmdb_ci.) If you are trying to put a reference qualifier on sn_customerservice_case.field, just use the reference qualifier field in the dictionary entry - there's nothing to override.



I hope I understood that correctly.


Not quitly.


I want to apply the reference qualifier on Task.parent, but the query will contain sn_customerservice_case.field.


Do you get me ?


I want the field 'parent' in the Case forms to be filtered, and reference only the other cases that have u_case_type = Global.