Mandatory field

Jen11
Tera Expert

Hi All,

 

We have a catalog item with the following fields: 

Jen11_0-1702588338761.png

 

I would  like if 'Supplier Name' name is empty, then 'Supplier Number' should be mandatory.  And if 'Supplier Number' is empty then 'Supplier Name' should be mandatory.  How can I go about doing this?

Thank you, 

4 REPLIES 4

Siddhesh Gawade
Mega Sage
Mega Sage

Hello @Jen11 ,

You can create an catalog UI policy for this case. In UI policy add a condition as if supplier name is empty.

And in UI policy action make the supplier number as mandatory true. Vice versa.

 

Please mark my answer as helpful based on impact!!!!

 

Regards

 

Siddhesh

SLK Gupta
Tera Guru

Hi @Jen11 ,

 

You simply need to create two Catalog UI Policies to achieve this requirement @Jen11 

To do This follow below steps @Jen11 .

1. Login to your instance

2. Go to Maintain items

SLKGupta_0-1702617781367.png


3. open your Catalog item were you want to make these fields mandatory.

4. Scroll down to the bottom to related list.

5. select Catalog UI Policies related list

SLKGupta_2-1702617898239.png

 

6. Select new Policy

SLKGupta_3-1702617921214.png

7. Name it like" when 'Supplier Name' name is empty then 'Supplier Number' should be mandatory"

SLKGupta_4-1702617975201.png


8. Put the when to run condition as :
              Supplier Name:: is empty
9. Save the record.
10. Now scroll down to bottom and select Catalog ui policy action's related list and select new.

SLKGupta_5-1702618031323.png

 

11. Select the Suplier number field and make mandatory "true".

12. Repeat the same steps for second UI Policy which is when "Supplier Number is empty then 'Supplier Name' should be mandatory".

If you follow these above steps you can fulfill your requiremnt @Jen11.

if my answer helps you in fullfilling your requiremnt please mark it as accepted solution / helpfull @Jen11 

Thanks & Regards,
S. Lakshmikanth Gupta

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Jen11 

 

It can achievable via UI policy (catalog UI policy)

LearnNGrowAtul_0-1702638665605.png

LearnNGrowAtul_1-1702638698513.png

 

Then created UI action

LearnNGrowAtul_2-1702638738743.png

 

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Siddhesh Gawade
Mega Sage
Mega Sage

Hello @Jen11 ,

You need to create two UI policies. Create exactly same catalog UI policy and UI actions, it will work for you ! I tested in my end.

SiddheshGawade_0-1702645018358.png

 

SiddheshGawade_1-1702645070808.png

 

Kindly mark my answer as Correct and helpful based on the Impact.

Regards,

Siddhesh