Setting number of cells in repeating group dynamicall

I have a database item with a ‘days’ field (for example, days = 7). Now I want to show a repeating group that has 7 cells reading, day 1, day 2, day 3 etc… how can I do this?

Set data type on RG as number (assuming your ‘days’ field is of type number) Then for datasource use your database item days field.
then in Rg add text and put static value of day and then dynamic value of current cells’ number

I can only get it to return the total number of days. It doesn’t split it to 1,2,3,4,5,6,7 etc…

It also won’t accept that data source. The field type is a number.

image

Okay, I thought days field was a list of days and not just a single number.

Then you will need to use a plugin, called toolbox that has an element called list of numbers.

Put the list of numbers element on your page and set it up

Screen Shot 2024-06-09 at 5.03.51 PM

Start number is 1, increment is 1, and length of list is your data field of Days.

Then on RG, you will use the datasource for the list of numbers elements list

Screen Shot 2024-06-09 at 5.04.58 PM

This worked! Thanks man.

1 Like