It is currently 25 May 2025, 21:50 Advanced search

Groups based on number of items

Questions and answers on how to best use Instant Developer

Groups based on number of items

Postby john w » 11 May 2025, 17:17

I have a panel with a list/grid it has 300+ rows of data in it.

I need to create 10 groups of data in the panel with each having 30 rows of data in them.

Is there a way to create a new data group for every 30 items?
Regards

John W
User avatar
john w
 
Posts: 844
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: Groups based on number of items

Postby r.bianco » 12 May 2025, 6:31

You could try adding a field to the data source and populating it with a group progressive, incremented every 30 records.
only work and no play makes jack a dull boy
r.bianco
 
Posts: 4974
Joined: 8 November 2010, 16:46

Re: Groups based on number of items

Postby john w » 12 May 2025, 15:00

Thanks for suggestion.

I can implement the counter. I was thinking (hoping) there may be a function to help define groups that I missed.

Onward...
Regards

John W
User avatar
john w
 
Posts: 844
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: Groups based on number of items

Postby d.termini » 12 May 2025, 15:03

There are the functions you need: you could use the SQLServer partitions.
But they are a bit tricky and not supported by the InDe query builder, you need to write the query by hand.
I would go with the r.bianco suggestion :)
d.termini
 
Posts: 1652
Joined: 13 November 2017, 8:41

Re: Groups based on number of items

Postby john w » 12 May 2025, 16:29

Thanks for the help! Using a counter is a reasonable solution. I just need to sort the logic out and it will all be good.
Regards

John W
User avatar
john w
 
Posts: 844
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA


Return to Tips & Tricks

Who is online

Users browsing this forum: No registered users and 20 guests

cron