How to write Back end script for radio buttons(Yes/No) based on other selection?

Service Now4
Giga Contributor

Hello Everyone,

I have a requirement that - if we select DMS - Core in Access Required to, the Remote Access(Yes/No) field must to be Hide. - I have done this by using Catalog UI Policy and Catalog UI Policy Actions.

And Can any one please help me with this : How to Keep the value 'Yes' in the Backend.

Please find the below Screenshot for your Reference,

find_real_file.png

1 ACCEPTED SOLUTION

Sagar Pagar
Tera Patron

Hi,

 

Set the default value to yes as shown in image.

find_real_file.png

Regards,

Sagar Pagar

 

The world works with ServiceNow

View solution in original post

16 REPLIES 16

Hi 

Harshvardhan
 
 
Harshvardhan
 
2020 Now Community MVP
2019 Now Community MVP
Correct Answers 500
69,755 points - Community Level 9

 

Hi Harshvardhan,

Thanking you so much...

I have followed the script which you have provided, It is working Good. But the 'Yes', 'No' fields are not hided there(Marked as Red in below Screenshot). We want to visible only 'Yes'. I have used below Script, but it's not working.

g_form.removeOption('ACCESS_VIA_CTRIX_OR_PC','Yes','No');

g_form.clearOptions('ACCESS_VIA_CTRIX_OR_PC','Yes','No');

g_form.clearvalue('ACCESS_VIA_CTRIX_OR_PC','Yes','No');

Can you please help me out with this issue...

Regards,

Jayashree

can you paste the full script ? why two yes option is coming ? 

Hi Harshvardan,

A minute mistake i have done, In place of capital 'Y' i used 'y'. g_form.setValue('ACCESS_VIA_CTRIX_OR_PC','yes');

 

Thanking you so much. 

 

Regards,

Jayashree

Hi Harshvardan,

Request for MV90; the Computer Number field has vanished in the backend. It is happening for Other Requests also.

 I have used Catalog OnSubmit Client Script,But it's not Working.

Please Help me out with this issue.......

Thanks&Regards,

Jayashree