Here is my requirement:
I have a SP list. Where, I have a choice field in this list with choices category 1, category 2, category3 and a participant name field.
Now the constraint is: category should only be used 30 times in the list. After which, it should not be able to create a list item with same category.
Is this possible with Nintex Workflow?
Since a workflow can only start after an item is created, your specific request is not possible in terms of preventing an item from being created. However the workflow run and determine if an item was the 31st item with a category, then delete it and send the user a notification.
If you wanted to prevent the creation of an item all together, you would need to build a custom form that would hide a category from being used if it were more than 30 times during the creation of a record.
you could create a validation rule and query the list for all the items that meets some criteria, in your case category.
you would need to use lookup() function to get all such items. then length(lookup(...)) will give number of items.
note however, this will not be 100% reliable, since if two or more users will be creating new list entry at about same time, they both/all might see current number of items below the limit. but once they all submit the form you will exceed the limit.
but maybe it will be sufficient in your scenario.
Something you may want to investigate (in a test setup) is to:
Although it's not a working answer (yet), it may get you on a track that may result in a working solution.
Another option would be to create a workflow that runs through all list items, counting the used categories and update a numeric column in the Categories list. If I'm correct, filtering the lookup control on this column (or use a filtered Categories view) should work. Downside is the workflow overhead (in case of large numbers of items/categories) and Category list availability (locking by workflow)
No problem. In which case you might want to look into my 2nd reply. You can a calculated column in your Categories list that only displays the Title when the LookupCount (filled by workflow) is < 30, otherwise it shows "".