How do you set up a streak function?

Hello everyone,

I’m trying (and failing) to set up a streak function that would add a value of “1” to a Numbers value in the user database as long as the user completes an action every day.

How would you best go about this and make it so the value gets added only once, not every time the user completes the action? I can’t seem to make this work with the conditional parameters Adalo allows for. :thinking:

Thank you for your help and have a great weekend,

Hi @Stefan76 ,

  1. You could add another field that is last streak date (not date time) and
  2. add another update action after first update that add +1, this second update will be in conditional that if the numbers > 1, set to 1 and then make group, then set conditional if start of today is last streak date (2 conditionals)
  3. update the last streak date together with +1 update

So, in summary
first update for +1 has 2 fields updated, the numbers and the last streak date
second update will override the numbers with 1 if numbers > 1

1 Like

Thank you for your reply, Yongki! :slightly_smiling_face:

I’m afraid I don’t quite understand your instructions (possibly because English is not my first language). Could you possibly break it down into more steps and explain in very simple terms what each step does?

This is to add new date field in your collection.

You can do this by clicking the 3 dots icon on left panel and choose make group.

I think this is the one that is not clear, apology.

You can use 2 buttons with the similar appearance and put different visibility for them, 1st button is when start of today is not equal to last streak date, 2nd button is when start of today is equal to last streak date.

So only one of them are visible at any time.

For action in 1st button, it will be only update for +1, which has 2 fields updated, the numbers and the last streak date

But for 2nd button, the actions need another update, which is update the numbers as 1 if numbers > 1

1 Like

Ah, I see. That was indeed the part I did not understand. Thank you for clarifying – I’ll try to set it up like this. :pray:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.