On a list page, how do I count the number of items for a specific date (that I get from url querystring) using jquery?
Solved! Go to Solution.
I have got a list of subscribers grouped by date. You can subscribe for a date to the list by submitting a nintex form. The redirection page when submitting the form is the list page to which I add the date into the url, for example "listpage?date=09052022".
When loading the listpage, if date into url querystring is note empty, it would count the number of subscribers for that date, for example for the 09052022. If the number of subscribers is over 24 for the 09052022, it would show an alert message "There is no more rooms for the 09052022. Please delete and register for another date".
In the advanced section of the Calculated Value control you can configure the control to capture the output in a variable.
Also as you are capturing the date from the URL you can populate a control on the form with the value and then add the control name to the formula I previously provided to make it dynamic.
Something like: count(lookup("NameOfList","Date",ControlNameHoldingDateFromURL,"ID",true)).
1. The form loads.
2. A control is populated with a date from the URL
3. The calculated value control returns the number of items with that date.