For many (not all) catalog items, we see quantity selector dropdown when requesting an item.
On Service Portal, we see like:
Or on normal Service Catalog UI, we see like:
This article focuses on the case where you don't want the quantity selector dropdown to show up.
- We have a checkbox called No quantity that decides whether a certain catalog item is quantifiable or not.
- In order to give power to the above checkbox's value (true or false) to control the display of quantity dropdown, we have a system property called "glide.sc.use_cart_layouts"
- This system property that uses the sc_layout driven cart macros.
- By default we have set that to true. Setting this to false, will make the above checkbox handle/control the dropdown display.
- Now pull this field via Configure > Form Layout on the catalog item form.
- Setting to true => Will indicate that the catalog item is not quantifiable and will hide the dropdown.
- Setting to false => Will indicate that the catalog item is quantifiable and will not hide the dropdown.
Kingston and London.
We have an onLoad client script called Cover when layouts field not on form that hides No quantity checkbox field based on the above system property's value (glide.sc.use_cart_layouts).
If the system property's value is true, it will hide the checkbox field (even pulled via Form Layout) => Otherwise, it will show on the form.