Hide catalog item for users who already raised a request from it.

Harshit Singh1
Tera Contributor

Hi Everyone,

 

I want to hide a catalog item from users who already raised a request from the catalog item once. I have tried user criteria scripting, business rule, catalog client script nothing is working for me. 

Can you suggest me how to achieve this scenario.

 

Best Regards,

Har**bleep** Singh

5 REPLIES 5

Mark Manders
Mega Patron

My first response would be: don't use a catalog item if it's only to be used once. Why not use a survey, assessment, or anything else?

But since it's probably already in use, a couple of suggestions:

  • Create a group, add the users requesting the item to the group once they have requested it and make the item not available for that group (user criteria), or
  • add all your users to the group and remove them once they have requested it and make the item available for that group (user criteria which also gives you a fast overview of who didn't request it yet

You could also script to the sc_req_item table in you user criteria, find if already one was created and if not, return, but I have seen scripted user criteria not working because of caching, so try to prevent that, if possible.


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

Hi @Mark Manders,

 

I think the approach you told is great. I will try out and will update you if it works or not.

 

Thank you so much

James Chun
Kilo Patron

Hi @Harshit Singh1,

 

That's a very odd requirement but instead of hiding the item, is it ok to prevent users from submitting it again?

If so, you can use the onLoad client script to display a warning message and the onSubmit client script to prevent submission.

 

Thanks

Hi @James Chun,

 

We have already restricting the users to submit the form if they have raised the request one time. But now the client want us to hide the catalog item if the user already raised the request.

Can we some how block the user to open the form?

 

Best Regards