How to know list count is even or odd?

I have a repeating group now. I want to do some change for this group when the list is even and odd. I didn’t find Remainder Operator %. I tried to use count /2 - count / 2:floor > 0. But it doesn’t work.


Event list count is 10 or 8, color is still green.

2 Likes

Hi @qianiaoo, for this you can use the <- modulo -> operator.

Expression for you would be:
Even: RG list count <- modulo -> 2 is 0
Odd: RG list count <- modulo -> 2 > 0

Here is an example:
Editor Link
Preview

Bubble Docs

2 Likes

Thank you a lot!!!

This topic was automatically closed after 70 days. New replies are no longer allowed.