I’ve been trying to figure this out but can’t find a way of doing it right.
I have a Repeating Group which is sorted by Dates. Sorting is ascending going from small to larger dates. I would like to have a visible text on just the Cell which is the first one in the month while on all the other cells of the month it would be off.
I tried to do that but I can’t get it working. Do you have an example? I would like to have a statement similar to: If Current Cell’s Date is first item in the month than make visible.
Hey @steve5, you need to create a condition based on the date of the previous cell in the repeating group.
Step 1 - Add a Hidden Input
We will need to get data from the previous cell and to do that we need to know what that cell’s index number is. So add an input to your RG called PrevCell# and uncheck the ‘this element is visible on page load’ option.
Make its Content format integer and the initial content will be Current cell’s index - 1
Step 2 - Set the Condition
We need a condition to hide/show the group. Simply put, the condition will say this: If the date in the cell just above the current cell’s month is less than the current cells month, show this group.
We will target the Repeating Group’s List of items like this. My sample RG has a type of date for simplicity, yours can be anything.
When:
RepeatingGroup date’s List of dates:item #PrevCell#'s value:extract month < Current cell’s date: extract month
Then:
This element is visible
This is the end result
I left my PrevCell# input visible for reference so you can see how it’s working.