How to Display a Field Dynamically Under Multiple Yes/No Options in Catalog Item?

NiharikaC
Tera Contributor

Hello Community,

I am working on a catalog item where I have multiple Yes/No fields (e.g., Option A, Option B, and Option C). Depending on the user's selection:

  • If Option A is "Yes," a shared field (let's call it Field1) should be displayed below it.
  • If Option B is "Yes," the same Field1 should be displayed below it.
  • Similarly, if Option C is "Yes," the Field1 should be displayed below it.

The issue I am facing is that the  Field1 does not display correctly when multiple options are "Yes." For instance, it appears under only one of the options. I need it to display under each variable if they select 'Yes'

I am using UI Policies to dynamically show/hide fields. I want to know the best way to configure this so that the  Field1 appears under all relevant options when selected, without duplicating the field in the catalog item form.

Has anyone encountered a similar issue? Any insights or best practices would be greatly appreciated.

Thanks in advance!

2 ACCEPTED SOLUTIONS

Juhi Poddar
Kilo Patron

Hello @NiharikaC 

  • It is not possible to show the same field, multiple times at form.

The workaround that can be done is:

  • Creating individual field for each option 
  • Create separate Ui policy for each option to show/hide the fields.

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps others find the solution more easily and supports the community!"

 

Thank You
Juhi Poddar

 

View solution in original post

Anand Kumar P
Giga Patron
Giga Patron

Hi @NiharikaC ,

 

ServiceNow forms are designed to display each variable in a unique position. Attempting to display Field1 under multiple options simultaneously isn’t feasible without duplicating the variable, which can lead to data consistency issues and negatively impact the user experience, as the same field would appear in multiple places.

 

If my response helped, please mark it as the accepted solution āœ… and give a thumbs upšŸ‘.
Thanks,
Anand

View solution in original post

3 REPLIES 3

SAI VENKATESH
Tera Sage
Tera Sage

Hi @NiharikaC 

 

We cannot display the same field in different positions, right.

 

Thanks and Regards

Sai Venkatesh

 

 

Juhi Poddar
Kilo Patron

Hello @NiharikaC 

  • It is not possible to show the same field, multiple times at form.

The workaround that can be done is:

  • Creating individual field for each option 
  • Create separate Ui policy for each option to show/hide the fields.

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps others find the solution more easily and supports the community!"

 

Thank You
Juhi Poddar

 

Anand Kumar P
Giga Patron
Giga Patron

Hi @NiharikaC ,

 

ServiceNow forms are designed to display each variable in a unique position. Attempting to display Field1 under multiple options simultaneously isn’t feasible without duplicating the variable, which can lead to data consistency issues and negatively impact the user experience, as the same field would appear in multiple places.

 

If my response helped, please mark it as the accepted solution āœ… and give a thumbs upšŸ‘.
Thanks,
Anand