Showing the variable editor on a custom table in a scoped application

zachsherwoo
Tera Contributor

I've been struggling to make a variable editor appear for a table extending sc_req_item. The idea is that an individual would submit an RITM (populating sc_req_item) and additionally send a copy of the RITM to the custom table. (I've created a BR in the scoped app that tries to accomplish this)

-----------------------

BR

(function executeRule(current, previous /*null when async*/ ) {

        var variables = current.variables;
 
//custom table below//
        var gr = new GlideRecord('x_bosu_bsw_test_extended_request_item');

        gr.addQuery('number', current.number);
        gr.query();
       
        gr.initialize();

        gr.number = current.number;
       
        gr.item = current.cat_item;


        gr.insert();

 
       
})(current, previous);
 

-----------------------

 

I've verified that I can grab the variables from the the submitted RITM and even populate fields on the form page of the custom table. But I've been struggling with making a variable editor appear (I've tried these steps https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0538897 and quite a few others I've found on forums here) but no luck so far.

 

Does anyone have any guidance or experience with customizing the variable editor (com_glideapp_servicecatalog_veditor or com_glideapp_questionset_default_question_editor) to make this work?

 

 
 
 
3 REPLIES 3

SanjivMeher
Kilo Patron
Kilo Patron

I think all you need to do is create a Formatter with the name variable editor with formatter as 'com_glideapp_questionset_default_question_editor' and table as your new table name. 

Once you do that, add the variable editor from the form layout to your new table form.

SanjivMeher_0-1718057287531.png

 

 


Please mark this response as correct or helpful if it assisted you with your question.

Alon Grod
Tera Expert

@zachsherwoo hi did you find a soultion?

Unfortunately not. After reaching out to support I received a "You are on your own message".