Catalog Item variable in SCTASK

StefanSrba
Tera Contributor

Hi all!

I have a Flow that Creates Catalog Task. It uses Catalog Item variable is_this_repairable_under_warranty.

StefanSrba_0-1760700811730.png

I have made that this variable is mandatory when closing task (Closed Complete) with UI Policy (match Short Description).

StefanSrba_1-1760701046000.png

This IF is not triggering okay because when flow Creates Catalog Task and Task is Closed Complete the variable is not 'caught' it stays empty untill next run.


I've tried action Wait for Condition - but this did not work either.

StefanSrba_2-1760701162843.png

What am I missing? Can I even do this?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@StefanSrba 
if you use the earlier "Get Catalog Variables" action output it might give you outdated variable value

Just before the IF logic you need to use "Get Catalog Variables" Flow action again to get the latest variable value.

see this KB

The "Get Catalog Variables" Flow Action will return Outdated Variables 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

View solution in original post

7 REPLIES 7

M Iftikhar
Tera Sage

Hi @StefanSrba,

 

Can you share the details of the UI Policy you're using? Also, when you manually set the Catalog Task to "Closed Complete," does the variable is_this_repairable_under_warranty show as mandatory on the form?


Also, if the variable type is Yes/No, then "No" is still a valid value. Making the variable mandatory does not mean it must be set to "Yes."

MIftikhar_0-1760713127923.png

 

Thanks & Regards,
Muhammad Iftikhar

If my response helped, please mark it as the accepted solution so others can benefit as well.

StefanSrba_0-1760943712541.png

StefanSrba_1-1760943734881.png


These are the conditions for variable being mandatory.

I would not have an issue with variable tracking the 'No' answer.

The issue is when I follow the flow execution the IF check looks like =yes  - as the left side of equasion is empty, not being filled at all.

RaghavSh
Kilo Patron

somehow your variable (warranty) value is not getting into flow, is it getting cleared my some UI policy or client script?

It seems an issue of multiple UI policies or client scripts or both colliding.


Please mark the answer correct/helpful accordingly.


Raghav
MVP 2023
LinkedIn

@StefanSrba were you able to get this working?


Raghav
MVP 2023
LinkedIn