Hide Rich text label

Sirisha Doli
Tera Contributor

How to hide Rich text label based on field selection.
If one field is selected from the select box then rich text label variable should not be displayed, if another is selected from the select box then it should be displayed.

 

Please help me on this.

Thanks

4 REPLIES 4

Shruti
Mega Sage
Mega Sage

Hi,

It can be achieved by using catalog ui policy and catalog ui policy action

Catalog UI policy  - Select dropdown/selectbox variable in the condition

Catalog UI policy action - To Hide/Show the rich text variable

SN_Learn
Kilo Patron
Kilo Patron

Hi @Sirisha Doli ,

You can achieve this by using catalog UI Policy and UI policy action.

I have a couple of fields, one is 'check box' and the other is 'label' field in the form as below:

SN_Learn_0-1709812532786.png

 

When I select the checkbox as True, the label field is not visible anymore.

SN_Learn_1-1709812629225.png

 

To achieve this, I have written the below catalog UI policy

SN_Learn_2-1709812806213.png

 

UI Policy Action

SN_Learn_3-1709812828981.png

 

Please le me know your views and Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

Rozmin  Begum
Tera Contributor

Hi Sirisha,

We can achieve it through catalog ui policy and catalog client script also
Catalog Client Script :

RozminBegum_0-1709813355744.png

Ui Policy :

Create Catalog Ui Policy >> Catalog condition >> "select your select box option " is Yes 
Then Catalog Policy Action >> new >> select "Variable name" >> select "Visible" as False

 

RozminBegum_1-1709813854764.png

 

If your ui policy is not working as expected better you go for this above client script.

 

Aniket Chavan
Tera Sage
Tera Sage

Hello @Sirisha Doli ,

Achieving the desired functionality without any scripting is quite straightforward using UI policies. Below, I've outlined a concise and effective approach along with visual references for better understanding.

 

 

Implementation Steps:

  1. Created Two Variables:

    • Variable 1: Select box named "Test User" with choices (EMP 1, EMP 2, EMP 3, EMP 4).
    • Variable 2: Rich label text named "This is Rich text label variable."
  2. UI Policy 1: Hide on Load

    • Configure the first UI policy to hide the rich label text variable on load.
    • AniketChavan_1-1709822291420.png
     
  3. UI Policy 2: Conditional Visibility

    • Set up the second UI policy to make the rich label text visible only when "EMP 3" is selected in the "Test User" select box.
    • AniketChavan_2-1709822966830.png
     

Final Output:

Scenario where condition is met:

 

AniketChavan_3-1709823041937.png

 

Scenario where condition isn't met:


AniketChavan_4-1709823084878.pngPlease let me know if you have further doubts or queries so that we can work on those accordingly.

 

 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks & Regards,

Aniket.