Field mandatory/not mandatory in Catalog Builder form

davida1
Giga Expert

I'm building a form with Catalog Builder, and have an issue with hide/show and mandatory/non-mandatory fields.

 

My main issue is that fields created with 'Mandatory' un-checked, and a UI Policy that just makes it visible or hidden, when it's visible it's also mandatory. None of my UI actions make it mandatory; it's for additional comments. Another field for video owner (if different from person submitting form); it also appears as mandatory when it's optional.

 

How can I determine why these fields are showing as mandatory?

 

2 REPLIES 2

joshuajacks
Kilo Sage

@davida1 

Hey, it may be helpful to include some screenshots of your configuration. I don't use catalog builder very often, usually just use the classic ui so I'm not sure what other artifacts get included by default using the builder. The ui policies sound like the culprit.

Are there any variable sets involved?

Do you have any scripts in your ui policies?

Are there any client scripts configured that make fields visible and/or mandatory?

BharatC
Mega Guru

Hi @davida1

Here are a few things to check that commonly cause this issue:

1) Variable's Base Definition - In Catalog Builder, open the variable and confirm the Mandatory checkbox is unchecked. If unsure, verify directly on the raw variable record via Service Catalog > Maintain Items > your item > Variables tab, as Catalog Builder's visual editor does not always sync cleanly with the underlying record.

 

2) UI Policies and Client Scripts - Even if your UI Policy does not set mandatory, another one might. Check all UI Policies on the item for any that set mandatory to true on those fields, including any you did not create. Also review Client Scripts for any onLoad or onChange logic calling g_form.setMandatory on the field name.

 

3) UI Policy Reverse if False - If your hide/show policy has Reverse if false enabled and any mandatory actions are defined, the reverse condition may be applying mandatory unintentionally.

 

4) Variable Sets - If your variables live inside a Variable Set, check the set directly for its own UI Policies or Client Scripts, as these will not be visible at the catalog item level.

 

5) Catalog Builder Sync Issue - There is a known quirk in newer releases where toggling Required in the visual editor does not always save correctly. Exit Catalog Builder and manually uncheck Mandatory on the raw variable record to be sure.

 

Hope this helps. Let us know what you find!

Regards,
Bharat Chavan