Counting in the database

So I was wondering if there was a way to count in the database(so that the first entry is 2, and the second entry is 2) Please Help

Hi there, @wetzeltechlab… can I assume you meant the first entry would be 1, the second entry would be 2, and so on? If so, a couple of ways you can go are when a new thing is created, set the field to a search for the last thing’s number plus 1 or set it to a count of the number of things in the data type plus 1. True, if lots of things get created around the same time, that could cause an issue with the numbering, but without knowing more about your exact use case, that’s what comes to mind.

Hope this helps.

Best…
Mike

If you ARE in fact trying to get a Thing count, where you want both to be 2 because there are 2 Things, I would highly recommend using a separate Data Type for this. I have a “Rollup” Data Type for Poll Votes, as an example, so that I can store the total number of votes for a Thing without storing it on every Vote. With the example as given, you would need to update every single record every time a Thing gets updated and depending on how many you expect, that’s madness haha

I figured it out, I just needed to put the amount of people who have pressed a button into a text with the command “search for signups:count” but thank you for the helpful replies!!

can i ask what you put in your do A search for ?

Sure, I put "name inputs = Current User’s real name
So whoever pressed the button, their name will be on the sign up

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