Help creating a concurrent streak - Will pay

Hi all,

I’m hoping someone on here is able to help me creating a streak.

I’ve looked through the various other posts on this forum relating to this and I’m ‘nearly’ there using the following workflow:

When checkbox is selected create a new thing(streak).
Only when:
Search for streaks:last items Date+(days): 1 < Todays date value or Search for streaks:count<1

This doesn’t create a new streak if there is an ongoing one with yesterdays date in - this all works as expected.

Make changes to streak
Search for streaks: last item created by current user.
Change:
Date = Todays Date’s value
Nosmokingstreak = This streaks nosmokingstreak+1

This also works as expected.

When it doesn’t work.
If i was to continue with just one specific streak, in this case ‘Nosmoking’ this would all work as required. If however I introduce another streak such as ‘Nochocolate’ and follow the same workflow this causes an issue as a new thing(streak) might be created for Nochocolate, so if there was an ongoing Nosmoking streak, when it searched for the last item it wouldn’t find a Nosmoking so would start a new thing(streak) for this.

I did think that creating a new data type for each one would probably work but I have 50 of them so not sure if this would be particularly efficient?

I hope this makes sense and someone is able to help, I am happy to pay for someones time if they are able to resolve this.

Thanks

John

Hi there, @john6… if you have different types of streaks, then I would think you just need to include the type of streak as a constraint on your search. So, you can’t just search for the last item created by the current user… you have to search for the last item of a particular type of streak that was created by a current user to see if there is an ongoing streak for that type. Oh, and there is no need to create a new data type for each type of streak… what you are describing can certainly be accomplished with one data type for streaks.

Any of that make sense?

Best…
Mike

Hi @mikeloc, thanks for taking the time to respond.

This has got me even closer to achieving what I’m looking for but still not quite there. The problem outstanding appears to be related to the ‘Make changes to thing’ bit of the process. If the ‘No smoking’ checkbox is checked for a subsequent day the ‘make changes…’ will change the date to ‘Todays date’ and ‘No Smoking’ to ‘yes’. The issue is that as the date has changed on the thing, if the ‘Nochocolate’ was marked as ‘yes’ then it now will be for the new date resulting in the checkbox being checked for ‘Nochocolate’ automatically.

Any help would be appreciated, I’ve spent several hours on this over the past few days,

Thanks

John

Hey, @john6… it’s kind of hard to understand your make changes workflow without some screenshots or maybe view-only access to your editor. That being said, are you saying you have a single record that tracks a user’s active streak(s), and you change the date on that record if any streak is active for that user on the current day? My apologies if I am way off here, but again, it’s hard to understand that workflow just based on the description of it.

Best…
Mike

Hi Mike,

Here’s some screenshots of the workflow, hopefylly that will help. I’d suggest starting at the bottom image and working up. I’ll PM you access details,

Thanks once again for your efforts so far.

Screenshot 1st

Hi all,

Really need some help to finalise this streak. @mikeloc has been a tremendous help (thank you very much) and we are so nearly there but need some further expertise to help resolve this.
I have setup editor access here, the streaks are all working as expected now, what is not are the checkboxes. What I want to happen is:

Select one or other of the checkboxes.
Change the date at the top to the next day.
The checkboxes should be blank as these have not been selected as yet and are not in the database marked as checked. This does not work unless you reload the page or you click to uncheck then check again.

Has anyone got any ideas as to how to set this up so the checkboxes reflect what is in the database eg they should be checked if they were checked on that date?

Thanks for all your help

John

Is anyone able to help me with this, I’m happy to pay for someones time to get this completed.

Thanks

John

Hi, @john6… I found some time to circle back around to the last piece of this puzzle, and I believe it is working as expected now with two steps that I added to the end of the workflow. Check out your sample project above and see if it looks right to you.

Best…
Mike

Hi @mikeloc

You’ve cracked it! Thank you very much for all the time you’ve spent on this, you’re an absolute legend.

I’ll leave this available for others in the future who may struggle with this.

Thanks again,

John

1 Like

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