how to limit the number of requests on a specific item in service portal???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-03-2022 08:46 PM
I need to limit the number of requests that users can make in a catalog item is specific

only for this item you only need to be able to select 3

I have already tried to configure the options but this affects all the items, some options that are in the community have already been tried but at the moment none have worked, I hope you can help me.
Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2022 11:24 AM
Hi,
I would disable the Quantity selector on this Catalog item, and instead create a Catalog variable that allows the user to select a quantity, by creating relevant choices (1,2,3 for example).
Then in your Flow that handles the request, set the Quantity on the RITM from the Catalog variable value.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2022 07:44 AM
Hi,
You would need to do like this in order to determine the Quantity value. Since this is OOTB, we don't have much options other than this.
#1-Create a Widget and name as you like
Name = QuantityChecker
On the Client Controller, copy this (Modify the quantity as per your requirement)
function me($scope) {
var c = this;
CustomEvent.observe('onsubcheck', function checker() {
var selquan = document.getElementById('catItemQuantity').value;
if(selquan > 3) { //You may change this according to your requirement
alert("More than 3 is not allowed for this item");
return false;
}
});
}
#2 - Create a Custom/Macro Variable in your Catalog item and provide the Widget name as "QuantityChecker"
#3 - Create a Catalog Client Script
Type = Onsubmit
function onSubmit() {
//Type appropriate comment here, and begin script below
CustomEvent.fire("onsubcheck");
}
Now, you are all set and will see like this when anyone selected the quantity more than 3
Please mark it as correct answer if it helps you so that this thread can be closed.
Thanks,
Narsing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2023 10:12 AM
This solution was very helpful to me! I didn't even know you could do this! Great solution!