Number of column in table

Good Day,

I am trying to number columns in the table, the table is a repeater.

The “counterNext” is set to “0” on page enter.

Screenshot 2022-11-26 at 16.52.50

I have set the below logic on the Content Logic of a text component in a repeating cell. The idea is every time a new column is created the “counterNext” increases by 1.

Screenshot 2022-11-26 at 16.11.49

But for some reason the first column start at “21” and not “1”.

Screenshot 2022-11-26 at 16.20.36

Kindly guide me on where the fault lies.

Kind Regards

Hello @Donovan_Hardwick

That is caused because content logic is running after any change in Page Data.

When you set some property in Content Logic - it triggers a new render. When render was run, Content Logic also running, set the property to Page Data, and trigger one more render. All that becomes an infinite loop.

To solve that issue you mustn’t set any data at handlers that end with ‘… Logic’.

Returning to the question, how can I numerate my cells?

You can add a counter property to the list which you use as a repeater before using it, just iterating over them.

Regards, Dima.