How to use Knowledge Base field variables in the User Criteria Script

Yi Ming Song
Tera Contributor

I want to make a User Criteria that compare with a variable in the Knowledge Base "test_field". I have a script include "test_script" with a function "test_function" that will return a value "test_value" when passing through the userid in a way that:

ga = new test_script();

user = new GlideRecord("sys_user");
user.get(gs.getUserID());
userID = user.sys_id;

test_value = ga.test_function(userID);

Now, how do I compare this test_value with the test_field on the Knowledge Base in the User Criteria to pass true when they match and false when they don't.

 

Appreciate any inputs, thanks.

0 REPLIES 0