On a list page, how do I count the number of items for a specific date (that I get from url querystring) using jquery?
Best answer by SimonMuntz
View originalOn a list page, how do I count the number of items for a specific date (that I get from url querystring) using jquery?
Best answer by SimonMuntz
View originalI 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".
Great, thank you!
How can I capture the output in a javascript variable? Please advice.
Hi.
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.
4. The custom javascript Pops up a message if the value equals a certain limit and the submit button is disabled based on a rule which looks at the same value from the calculated value control.
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.