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.

create SCTASK based from an update of another SCTASK

Momiji
Tera Contributor

Hi! I'm not sure if this requirement is possible. 

 

After filling up the catalog item, SCTASK1 is created. In SCTASK1, there are 4 questions that needed to be answered (I have already set them up to not be visible in the catalog form, hence they are not visible in the RITM).

When the 4 questions are answered in SCTASK1, new SCTASKs are created. This is the part that I'm having a hard time. I'm not able to create new SCTASKs.

I have created two flows:

1st flow creates SCTASK1.

 

2nd flow is supposed to create new SCTASKs which is not working. The trigger I used is when the catalog task is updated where the Short description is 'Perform an investigation'. The update here would be when the 4 questions are answered in SCTASK1.

I didn't encounter errors when I tested the flow. The new SCTASKs were even created.

 

I don't think the trigger is working. I tried adding an Update action on the catalog task like the Description field is updated, but it is not even working.

2 REPLIES 2

Brad Bowman
Kilo Patron
Kilo Patron

Why would you not just add the other Create Catalog Task activities to the same flow?  When the 4 variables are populated on the Catalog Task, it needs to be closed or some field, not variable, updated for the other trigger to work.

kaushal_snow
Giga Sage

@Momiji ,

 

It’s usually because the trigger you used isn’t firing reliably for that update, so instead of triggering only on short description changes it’s better to use a record updated trigger on the sc_task table with conditions that check the actual fields.....so the flow will run when those fields truly change, and then in the flow itself use actions create record to generate the new sc task and make sure you map the parent RITM correctly to avoid orphan tasks......

 

If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/