Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

how to make Datalookup Matcher tables available regardless of scopes

chanikya
Kilo Sage

Hi All,
I would like to make OOB Datalookup Matcher tables available regardless of scopes
For that I did below thing
1. allow_tables:dl_problem_priority:dl_u_assignment:dl_u_priority

chanikya_0-1759437460648.png

2. tableChoicesScript=AccessMatcherTables

I want to make available this matcher tables to Global, CSM, HR. So how can I do.

Script Include: AccessMatcherTables :

var AccessMatcherTables = Class.create();
AccessMatcherTables.prototype = {
    initialize: function() {},
    process: function() {
        var allowedScopes = ['global', 'sn_customerservice', 'sn_hr_core'];
        var answer = '';
        var answerArr = [];
        if (allowedScopes.length > 0) {
            for (var i = 0; i < allowedScopes.length; i++) {
                var gr = new GlideRecord('sys_db_object');
                gr.addQuery('super_class.name', 'dl_matcher');
                gr.addQuery('sys_scope.scope', allowedScopes[i]);
                gr.query();
                if (gr.next()) {
                    answerArr.push(gr.sys_id.toString());
                }
            }
        }
        answer = answerArr.join(',');
        return answer;
    },
    type: 'AccessMatcherTables'
};


Still No use, OOB matcher tables also not showing for Global also.


any suggestions and help here please

2 REPLIES 2

G Ponsekar
Tera Guru

Hi @chanikya ,

 

have you checked cross scope access records?

if cross scope access records not present, then you must create a Cross-Scope Access record.

  1. Navigate to Cross-Scope Access: In the filter navigator, type sys_cross_scope_access.list.
  2. Create a New Record for each scoped application.
    • Source Scope: The scoped application that needs access (e.g., CSM Workspace).
    • Target Scope: Global.
    • Target Type: Table.
    • Target Name: The table from the Global scope that you need access to. In this case, dl_matcher. You can start with dl_matcher and then add more specific tables (dl_problem_priority) if necessary.
    • Operation: Read.
    • Status: Ensure the status is set to Allowed

 

And in your script include, instead of returning sys_id can you return names and check

If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!

 

Thanks, GP

 

 

I did this Cross application scope, but still same issue. no Mather tables are showing.