The Zurich release has arrived! Interested in new features and functionalities? Click here for more

About dynamic display of Catalog variables in catalog item

nakamura323
Kilo Guru

I would like to display Catalog variables dynamically.

For example, if you prepare three variables, A, B, and C, and there is an input to A, you can input B.

It is assumed that if there is input in B, input will be possible in C.

Is this possible?

How do you achieve this?

thank you.

1 ACCEPTED SOLUTION

Sanuja Kulkarni
Mega Guru

Hello @nakamura323,

 

Create a catalog UI policy on the B and C variables to accomplish this behavior. please refer following screenshots 

Capture3.PNGCapture4.PNG

View solution in original post

3 REPLIES 3

Harish KM
Kilo Patron
Kilo Patron

Hi @nakamura323 If i Understand your question, you want to display variables like this?

variable A--> filled display Variable B

variable B-->filled display variable C?

is this what you want? then use UI Policy to hide or show variable

Regards
Harish

Sanuja Kulkarni
Mega Guru

Hello @nakamura323,

 

Create a catalog UI policy on the B and C variables to accomplish this behavior. please refer following screenshots 

Capture3.PNGCapture4.PNG

Pravindra1
Tera Guru

Yes, you can create variables with hidden checkbox true and write onChange Client Script to make the other variables visible.

In your Example : you can create B & C variable with hidden checkbox true,

then create an onChange client script (on change of Variable A) and write script to make the Variable B visible.

Similarly create an onChange client script (on change of Variable B) and write script to make the Variable C visible.

 

function onChange(control, oldValue, newValue, isLoading) {
   if (isLoading || newValue == '') {  
    g_form.clearValue('b'); ////if variable A is empty the clear the value of B
    g_form.setDisplay('b', false);
      return;
   }
   //If Variable A has value then display Variable B
   if(g_form.getValue('a') != ''){
    g_form.setDisplay('b', true);
   }
   
}