Catalog item

Nikita50
Tera Expert

Hi All,

 

How to put validation that a particular catalog item cannot be submitted more than thrice in a day?

 

 

6 REPLIES 6

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Nikita50 

 

Some idea

 

Flow Designer with Action

  1. Use a Flow that runs on submission
  2. Use a Look-Up Records action to count how many times the catalog item has been requested today
  3. Add a condition: If count ≥ 3, show an error message and abort
*************************************************************************************************************
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]

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

Mark Manders
Mega Patron

Depending on your exact use case (taken in mind that it may not be 3 times per user, but 3 times total), we once created something similar (although it was 8 times for that client, because it was the request to run an automated job that could only run 8 times per day).

 

You have to keep in mind that, depending on the size of your company and depending on what the item is for, you can have two requests already and 2 people are working on filling the same request again, which will end up in 4 requests, since User Criteria may hide an item (Ankur's solution), but once you have the form on your screen, it's there.

We took the flow behind the catalog item and after it started and the RITM was created, we did a check on the number of RITMs in the system. If it found the number of times it could be requested (3 in your case), it meant that this was number 4 and it shouldn't be processed. We closed the created RITM with those close notes (unfortunately, we can only process this X number of times per day. Please try again tomorrow) and we inactivated the Catalog Item in 'if' section of the flow as well. A scheduled job that ran at midnight activated it again. 

 

If the number is not yet reached, you can just continue with your logic (task creation, execution, etc.)

The reason we inactivated the Catalog Item was because we also had another Item that was just a content item, linking back to the catalog, that had the same layout and title as the actual item, only we added the text 'unfortunately, we are at today's limit for this item' or something like that. And that one was activated within the flow (and inactivated with the scheduled job). We did this last part when the servicedesk was getting calls from people that couldn't find the item on the portal.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark