Please help with Client Script to hide a text box.

Lisa Goldman
Kilo Sage

Hello,

I have the following 2 variables on a Catalog Item.

  1. Single Row Variable Set
  2. Single Line Text Variable

LisaGoldman_0-1691523288638.png

 

I need help on Client Script if Single Row Variable is empty, hide the Employee ID Text Box else don't hide it.

 

Thank you

 

12 REPLIES 12

Hi @DanielCordick 

Our use case this when there are more users, we pop up a set of questions or a message telling them what to do next. If there are no additional users (The field is empty).  Don't show any questions. 

Salman AHmad
Kilo Expert

Hi Lisa,

 

The simplest way is you need to create UI policy put condition when "Also Request For" is empty and set "Employee ID" field is visible false.

First of all I sincerely thank everyone for your suggestions and helpful.  I have reached out the SN support and here is the answer I got back:

LisaGoldman_0-1691768539281.png

 

As I mentioned previously, if you could follow the below steps and create it in your PDI and let us know if how it goes.  

 

1.   Create a Single Row Variable Set

LisaGoldman_1-1691768597558.png

 

2.  Create "Request for" type variable in side of Single Row Variable Set

3.  Under "Type Specifications" Tab, Select "Enable also request for" check box

LisaGoldman_2-1691768597525.png

 

4.  Create a Single Line Text Variable

 

LisaGoldman_3-1691768597532.png

 

 

5.    Use UI policy and see if you can hide the "Also request for"  field.

LisaGoldman_4-1691768597555.png