Data Filtration - problems using a dynamic data condition

jMarshal
Mega Sage
Mega Sage

I am having some trouble setting up a dynamic data condition on a Data Filtration record.

This Data Filtration record is looking at the sc_req_item table and filters based on the specific catalog item used to generate the record. There is also a data condition that will filter when the requested_for is NOT the logged in user (the filter doesn't apply if you are the Requested For, regardless if you are the Created by or Opened by).

I have a custom field on the "sc_req_item" table which is a reference field to the sys_user table (just like requested_for) and I want to have this filter condition so that it also filters when this custom field is NOT the logged in user (the filter doesn't apply if you are the Requested For or this custom field, regardless if you are the Created by or Opened by).

My problem is that the data condition builder doesn't let me do an "is not" for dynamic values...it only lets me use "is" for dynamic evaluation.

I know this can be done as we had this created initially by a partner (I didn't create the data filtration record), but I am unsure how they would have done this - hence, this post...hopefully someone knows what's in the secret sauce here.

This is what I see when I look at the data condition on the filtration record in question (see screenshots below) and if I elevate to security_admin, I get the standard condition builder -- and this is what I cannot use to do the "is not (dynamic)" operator.

I know they are using a dynamic operator for this as I have tested it by trying to add it myself, but then impersonated a different admin and see that it is not dynamic, but static...which is as I would expect, based on how it was created using the condition builder.

Existing filter written by partner using dynamic "is not" (read only record before elevation):

jMarshal_0-1725379102785.png

Existing filter when I try to edit after elevating as "serucity_admin" using the condition builder - see that there is no "is not (dynamic)" option available:

jMarshal_1-1725379282983.png

 

If I use the regular "is not" operator (with the red X in the screenshot above):

 

 

jMarshal_4-1725379620412.png

 

It looks fine at first...but not when I impersonate a different admin user:

jMarshal_5-1725379832282.png

jMarshal_6-1725380178990.png

Also, FYI - the reason I am impersonating an admin user, is because they have access to data filtration records. Since I can see the outcome from using the dynamic or static operator for data condition in the filtration record, I have not tested beyond this to "know" if it "actually doesn't work" (as I expect it doesn't).

Does anyone know how to use the dynamic "is not" operator in the condition builder...or some other way to write the condition and apply it to the data filtration record's data condition field?

2 REPLIES 2

Martin Brochu
Tera Guru

Hi,

Maybe your partner used a script to populate the DataCondition. Here is how this can be done: https://www.linkedin.com/pulse/service-now-data-filtration-plugin-how-use-caller-me-ivan-betev/

Note that I did not try the script.

Regards,

Martin

Thank you, I'm willing to bet that is it!


I'll test this in a subproduction environment and accept as solution once I confirm it works.