Variable mandatory On Saving form in SCTASK

Sylvain12
Tera Contributor

Hi Everyone,

 

I am trying to set a variable mandatory in a SCTASK of a catalog item.

 

The condition is the SCTASK state.

 

It works fine if task state is closed complete, the task cannot get closed if the variable is not filled.

 

However I have to set the variable mandatory if task state is: Pending.

I used a UI Policy with setMandatory in the script.

The variable becomes mandatory in the form, but it is still possible to save it without populating the variable.

Basically the red star (for mandatory) is showing up when I select "Pending", but it disappears when I save the form.

 

Anyone might have an idea on how to fix this ?

 

Thank you very much in advance for your kind support.

 

Kr,

Sylvain

6 REPLIES 6

DineshGivare
Tera Contributor

Hi @Sylvain12 ,

 

I tried both ways (with and without script), it worked for me when I click on 'Update'. PFB snapshots.

 

UI Policy without script is being used on 'Var'

UI Policy with script is being used on 'Var2'

DineshGivare_0-1729080009009.png

 

DineshGivare_1-1729080064231.png

 

 

Thanks,

Dinesh Givare

 

Sylvain12
Tera Contributor

Hello, 

 

Thank you all for your replies.

 

It is strange it's not happening in my case, maybe a customization of the platform...