Hide/remove option

sparkles
Tera Contributor

Hello!

 

I have a variable set called "data_options" that has variable called "choice" which contains 7 choices. The variable set used by 3 service catalog item (A,B,C). We need to hide one of the options from the choice variable for catalog item "A". I tried client script but it did work. Any idea?

 

sparkles_0-1744752798867.png

 

8 REPLIES 8

Sandeep Rajput
Tera Patron
Tera Patron

@sparkles Please try the following script.

 

function onLoad() {
  g_form.removeOption('choice', '5'); //No need to dot walk to the choice field via variable set. It is directly available.
}

Hope this helps.

Hi @Sandeep Rajput, thanks for your reply. I tried your solution and it didn't work so I thought I need to dot walk. One thing I forget to mention that the choices come from another table.

 

@sparkles Could you please post the snapshot of the Type specification tab of the choice variable.

 

 

 

sparkles_1-1744809664063.png