Block Catalog item submit and clear the field

Tom Thompson
Tera Expert

 

I'm trying to block a item from being submitted if they state its not an Emergency by selecting No.

 

I need it to Block which its doing but I need it to clear the 2 fields and that is not working.

It worked 1 day and stopped the next

 

What is wrong here?  and will this work in the portal?

 

TomThompson_1-1726713023078.png

 

1 ACCEPTED SOLUTION

@Tom Thompson 

If you want to clear variables and also abort the submission if emergency variable is No then you should not have two return false statements in your client script.

 

You can move clearValue statements also to the If block and remove return false statement from line no-5

View solution in original post

8 REPLIES 8

Sid_Takali
Kilo Patron
Kilo Patron

Hi @Tom Thompson Make your Catalog Client Script UI Type as All and which type of variable is Emergency Request?

If it's Choice field you need to use backend value of No choice option in getValue() API

Emergency Request is a Yes/No box

 

TomThompson_0-1726715297519.png

 

@Tom Thompson 

If you want to clear variables and also abort the submission if emergency variable is No then you should not have two return false statements in your client script.

 

You can move clearValue statements also to the If block and remove return false statement from line no-5

That was the problem, Thank you..