Interactive Filter using string field

Stephen Frederi
Giga Contributor

I am trying to create an Interactive filter that will allow me to filter an Incident Dashboard based on the Business Unit of the Affected User. The Business Unit field is a custom string field (u_business_unit) on the User table that we are populating based on an import from another system.

I am struggling creating creating this mapping (Incident -> Affected_User -> u_business_unit) within the Interactive Filter as this field does not appear as it is a string field and not a reference field. This made me realize the issue.

I believe based on my research this will require scripting a custom interactive filter using a Dynamic Content Block (example here) which is where it starts to exceed my skill set.

Is scripting this filter the only option? Any ideas on how to do this from someone who isn’t skilled at scripting?I plan to eventually also create Interactive Filters based on a user's Business Unit for other types of tickets like Changes and Requests as well I just am trying to find an example to start with.

Note: I also found a link to a session at K19 in some other posts with a lab related to this.

4 REPLIES 4

Adam Stout
ServiceNow Employee
ServiceNow Employee

If u_business_unit is a string and not a reference to a table, you'll have many problems.  I would highly recommend fixing that.  It may be a small table, but it will make a big difference.  The amount of effort needed to fix this is trivial compared to the effort needed to work around this not being a reference.

Mitch16
ServiceNow Employee
ServiceNow Employee

@Adam Stout just to be perfectly clear, you're saying @Stephen Frederick should:

  1. Create a table called u_Business_Unit and populate it with the names of the BUs
  2. Change the "u_business_unit" field type from String to Reference
  3. Set the field value to the new table

is that right?

Adam Stout
ServiceNow Employee
ServiceNow Employee

Yes.  I thought there was an OOTB table for Business Unit (but I'm not sure what package that comes in).

business_unit is an OOB table which can be leveraged.

It global object and it comes with platform.

 

Regards,

Sachin