Making work notes mandatory if additional comments are empty and making additional comments mandatory if worknotes has some value.

Bhavna Chauhan
Tera Expert

Hello,

I just want:

If user has closed completed a catalog task VIA ServiceNow THEN they should be required to enter EITHER worknote or additional comments.

- If user provides additional comments then worknotes are not required
- If user provides worknotes then additional comments are not required.

Solution: I was thinking to do this by client script but additional comments and worknotes label are not visible there, so i decided to create the Client Scrpt, but it also doesnt work. Cn anyone help?

 

 

1 ACCEPTED SOLUTION

Bhavna Chauhan
Tera Expert

Hello,

I have tried another way, first i made both additional comments and work notes mandatory using UI policy,where condition is State is Close Complete.

Then I create two onChange client scripts separetely: one for Additional comments and one for work notes:

OnChange Client Script will looks like this where field will be Worknotes:

find_real_file.png

OnChange Client Script will looks like this where field will be Addtional Comments:

find_real_file.png

Hence, it worked. 🙂

View solution in original post

5 REPLIES 5

Bhavna Chauhan
Tera Expert

Hello,

I have tried another way, first i made both additional comments and work notes mandatory using UI policy,where condition is State is Close Complete.

Then I create two onChange client scripts separetely: one for Additional comments and one for work notes:

OnChange Client Script will looks like this where field will be Worknotes:

find_real_file.png

OnChange Client Script will looks like this where field will be Addtional Comments:

find_real_file.png

Hence, it worked. 🙂