How to hide the title of a variable set

M_Tomy
Tera Expert

Dear Experts.

 

I have a requirement to show or hide certain variables under certain conditions.
So I have used "g_form.setVisible" in the UI policy to hide the variables in the catalog task.
However, I am having trouble seeing the title of the variable set to which the hidden variable belongs.

I would like to hide the title of the variable set without using the SysID of the variable set if possible.
Please let me know if you have any insight.

 

▼Added on 10/29/2022
Added an image drawing.
Please refer to it as well.

 

Best regards.

 

 

9 REPLIES 9

Muhammad Khan
Mega Sage
Mega Sage

I believe it is a Single Row Variable Set. If so, then try unchecking Display Title checkbox in variable set record, but it will be reflected in all catalog items in which this variable set in included. Refer to below image.

MuhammadKhan_0-1666986233938.png

 

Mr. Muhammad Khan

 

Thank you for your reply.
The image is different because I want to hide the title according to the condition, not hide it always.
I apologize for the lack of wording in my question.

 

Thank you for your continued help.

Sagar Pagar
Tera Patron

Hi @M_Tomy,

 

As mentioned in screenshot, you have hide the variables under variables set1 using UI policy based on some conditions. It should hide the Variable set title as well, if all variables are hidden under it.

 

Thanks,
Sagar Pagar

The world works with ServiceNow

Mr. Sagar Pagar

 

Thank you for your reply.

I have never hidden the title of a variable, is it OK to use the following statement?

  g_form.setVisible('VariableSet1', false);

 

Best regards.