Add row at the beginning of a table

I have one table, where it initially only has 1 row. The table is used to determine the cost and the effects whenever users upgrade.

For example the initial value for cost in the table is 500. Then users upgrade for the cost of 500, at the same time I add a row at the beginning, and increment the value of 500 by 10%, so there are now two rows (first row = 500*110% = 550, second row = 500), so when users want to upgrade again, it will cost them 550 (value in 1st row). The table will be added one row at the beginning whenever users upgrade.

My question is, when my table reaches a number of 100 rows, will this method works? I mean, will it add a row at the beginning and 'kick out' the last row (the 100th row)? Or will it not work when it reaches 100 rows?

Thanks.

Best Answers

  • SummationSummation Posts: 476
    Accepted Answer

    @tatiang said:
    Summation As this was posted to the Mac subforum, I assumed the person was using a Mac and therefore not limited in that way but thank you for bringing that up because perhaps pokapola is using a PC...?

    Summation Do you know what happens if you add a new row to the beginning of a 100 row table? :o

    I made a demo with two actors and one table with 100 rows and 1 column.

    Actor 1 is set to display the value of table 1, row 1, column 1 (this is a text string: "Row One")
    Additionally, Actor 1 is set to add a row to table 1 on touch.

    Actor 2 is set to display the value of table 1, row 100, column 1 (this is a text string: "Row 100")

    In the viewer, these two actors display their respective strings as intended.
    However, when I press Actor 1, no text displays in Actors 1 or 2.
    But the viewer does not crash.

  • SummationSummation Posts: 476
    Accepted Answer

    Here's that demo just in case anyone wants to mess around with it.

Answers

Sign In or Register to comment.