Get state value of child tasks

Ben42
Tera Contributor

Hello,

 

I have 2 child tasks created under a parent record. And two tasks are of two different “Type”s. Now I wan to get the state value of those two tasks.. how can I get that? 

based on the state values of those two tasks, I need to set field on parent record. It’s not just when two child tasks state is closed then close parent.. we have other combinations we need to check for state fields on both child tasks.. 

 

when state on two child tasks are closed then close parent.

when state on one task is closed and other one is pending then set state on parent to different value.

Any help with script is much appreciated!

Thanks,

Ben

6 REPLIES 6

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Ben42 

 

Practically, which task will take precedence? if both task has 2 different state.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hello,

Both tasks are created at the same time via Flow. And task of Type1 gets its state updated first.

 

thanks,

Ben.