We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Can we create Approval Workflow based on Catalog Item Variable the Custom Table Approver field?

VIKASM535239375
Kilo Sage

Can we create Approval Workflow based on Catalog Item Variable present in the Custom Table and Approver field  value of record to be triggered based on it .

5 REPLIES 5

pavani_paluri
Tera Guru

Hi @VIKASM535239375 ,

 

Yes, you can do this. You just connect the Catalog Item variable to your custom table, and then build a workflow/flow that reads the variable and sends the approval to whoever is in the Approver field.

If you can share more details of catalog item, variable and custom table. I can help you build a flow for this requirement.

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P

Adrian Ubeda
Mega Sage

Hello @VIKASM535239375 ,

 

You can build your approval flow using 'ask for approval' action, the trigger of that flow can be a creation/update record and then retrieve data needed 

AdrianUbeda_0-1770979320360.png

 

If it was helpful, please give positive feedback! āœ”
ā˜† Community Rising Star 22, 23 & 24 ā˜†

yashkamde
Kilo Sage

Hello @VIKASM535239375 ,

 

For this in your workflow use Run script action and in that code for accessing your variable present in custom table :

Means I had done this requirement through action in flow designer so -> In your Run script code like this :

workflow.scratchpad.variable_name = 'ApprovesAnyU[';
var gr = new GlideRecord(<custom_table_name>);
gr.addQuery('sys_id', 'SYS_ID_RECORD');
gr.query();

if(gr.next()){
    var arr = gr.getValue(<FIELD_NAME>).split(',');
    // IF MULTIPLE VALUE USE FOR LOOp
    for(var i=0; i<arr.length; i++){
        workflow.scratchpad.variable_name += arr[i];
        if (i < arr.length - 1) {
        workflow.scratchpad.variable_name += ',';
        }
    }
    workflow.scratchpad.variable_name+= "]";
} else {
    workflow.scratchpad.variable_name = 'No record found';
}

 

Screenshot 2026-02-13 174549.png

 

 

And Then pass the values stored in approvals from run script section to -> Ask for approval Action :

Screenshot 2026-02-13 174708.png

 

If my response helped mark as helpful and accept the solution.

 

Ankur Bawiskar
Tera Patron

@VIKASM535239375 

are you using workflow or flow designer for your catalog item?

 

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader