I'm trying to create an app that will create new rows in an excel table, and can also increment values (for example- index value of each row) when a new row is created.
First, I sort the table by descending index value. Then, I pick the value of the first index, ensure it is converted to a number (hence the Value command), then add 1 via Sum, then convert back to Text so I can feed it back into the index (doesn't work otherwise). It looks like this:
Collect(Table1, {index:Text(Sum(Value(First(Sort(Table1.index,SortOrder.Descending)).index),1),"[$-en-US]#####")})
My problem is that when I test this function, it always creates a new row with a value of 2 in the index; no matter what the current largest index value is. What am I doing wrong?
Solved! Go to Solution.
Hi @iakhre,
The issue here should be related with the First function.
Take a try to replace it with the last function, that should make the logic work.
Besides, take a try to switch the Text part of the formula as below:
Text(Sum(Value(last(Table1).index),1),"[$-en-US]#####")
Regards,
Michael
Hi @iakhre,
The issue here should be related with the First function.
Take a try to replace it with the last function, that should make the logic work.
Besides, take a try to switch the Text part of the formula as below:
Text(Sum(Value(last(Table1).index),1),"[$-en-US]#####")
Regards,
Michael
User | Count |
---|---|
224 | |
100 | |
94 | |
57 | |
31 |
User | Count |
---|---|
281 | |
114 | |
110 | |
63 | |
57 |