I am looking for a way to verify at least 1 file is attached to the RITM form , I dont need to care about what type of files or their names, attachment validation is after submission of the catalog item.

Ram141
Tera Expert
Hello all,

1. I am looking for a way to verify at least 1 file is attached to the RITM form , I dont need to care about what type of files or their names, attachment validation is after submission of the catalog item.

2. If attachment if not attached RITM state should populate as pending Info

3. Mail notification should be sent to user to attach the attestation before 15 days or else request should be cancelled. 

4. If user doesn't attach the attachment request should go to cancelled state.

 

Thanks,

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I believe you will be having workflow attached to RITM; in the run script check if current record has any attachments; if not then set the RITM state using set value; as next activity send notification to user to attach the file; wait for 15 days; after 15days timer set the ritm state as cancelled

Script to check if attachment present or not; use if activity

answer = ifScript();

function ifScript(){

if(current.hasAttachments())

return 'yes';

else

return 'no';

}

the output of no activity will be email activity

you can use timer activity and give 15 days as the time

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

View solution in original post

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I believe you will be having workflow attached to RITM; in the run script check if current record has any attachments; if not then set the RITM state using set value; as next activity send notification to user to attach the file; wait for 15 days; after 15days timer set the ritm state as cancelled

Script to check if attachment present or not; use if activity

answer = ifScript();

function ifScript(){

if(current.hasAttachments())

return 'yes';

else

return 'no';

}

the output of no activity will be email activity

you can use timer activity and give 15 days as the time

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Hello Anukar,

Thanks for the reply.

 

It worked properly when we don't attach any attachment within time,

but it's not checking the attachment when we attach an attachment after RITM state goes to pending Info, request is directly going to cancelled state even though i attached an attachment.

 

Thanks, 

Hi,

That's because the check to determine attachment is present or not is before you set it to pending info

Regards

Ankur

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

Hello Ankur,

Thanks for your valuable time.

I have written multiple if conditions and notifications in regular intervals and now its working as expected.

Thanks,