Creating unique IDs in tables in ascending order

I was wondering if there is a way to create ID’s in an increasing fashion.
For example:

1 Like

Hey @gleeTICO ,

Take a look at this technique

1 Like

Hey @freedman,
This is exactly what I needed. Thank you.

I have used this and implemented it in my app, but I can’t seem to get past 2 auto-increments.

@gleeTICO could you share the link to your application (maybe in a DM?)

@gleeTICO Your application logic is correct. The issue is that you are doing this in “test” or “developer mode” which doesn’t actually write to the table. The aggregation will never be updated in this mode - you will need to run the application in the player.

Let me know if you still have issues after trying this. Thanks!

Hey @freedman,
I actually did run this in the player. It gives me this:
Screenshot 2022-06-01 132236

If I remove the first ID, it gives me 3, and then errors again. I think the maximum records it makes is only 2 which is odd.

@gleeTICO It looks like the query that you are using for your aggregation is a filtered query

You should add a new query (the “subsequent ids” query) that has no filters and add your aggregation to that, instead.

Does that work?

1 Like

Good catch!! That was the issue. Thanks for your time to look at my app and figure out the issue. Thank you.

1 Like