workflow script activity - conditional based approavl - vancouver

levino
Giga Guru

Hi  there

 

i have a cat item with a free text field where users type in mailbox email address.

i have also created in the sys_user_group table,   with the mailbox email address.

 

how do i trigger  a group approval to the relevant group for approval.

 

e,g  if user type in   fireandemergency@yahoo.com  it checks the sys_user_group table and then triggers approval to the relevant group

 

can it be just 1 if script with a dynamic approval group based on the conditions above?

 

Thanks

Levino

 

 

 

 

 

 

 

2 ACCEPTED SOLUTIONS

Kavita_Bhojane
Tera Guru

Hi @levino ,

 

You need to write this script in "Approval - Group" activity as per attach snapshots:

var answer = [];
var grp = new GlideRecord('sys_user_group');
grp.addQuery('email'current.variables.email_address); //free text field where users type in mailbox email address
grp.query();
if(grp.next()){
answer.push(grp.sys_id);
}

 

Please mark my answer helpful and accept as a solution if it helped 👍✔️

Thanks,
Kavita Bhojane

 

View solution in original post

Kavita_Bhojane
Tera Guru

Hi @levino 

 

Thank you for acknowledging my response as helpful.

If my assistance proved beneficial, please mark it as correct and close the thread to benefit future readers.

 

Regards,

Kavita Bhojane

 

 

View solution in original post

5 REPLIES 5

Kavita_Bhojane
Tera Guru

Hi @levino 

 

Thank you for acknowledging my response as helpful.

If my assistance proved beneficial, please mark it as correct and close the thread to benefit future readers.

 

Regards,

Kavita Bhojane