Unique Values for Users

Hi,

I have a workout app that has Users, a Workout Schedule (26 weeks), and a Log (tracks the workouts a user has completed).

When a user creates an account I want their account creation date to drive the workout schedule (date field) - but I can’t figure out how to do this without replicating all 180 workouts with their unique dates and then filtering to the user.

An alternative would be to number the workouts (not ideal), but then I can’t figure out how to filter out the workouts that have been completed (entered in the Log). I can show the completed workouts by using the log…

Thanks for the assistance!

You can see the app here.

Hi Erik,

Do you find a solution for this?
I have a similar problem.

Thanks!

Welcome to the Adalo community!

I haven’t thought about this problem in a long time! I am going to revamp that app in the future though.

Here are a few thoughts to the issue I had, but both stem around the fact that you can’t bulk create records in adalo:

  1. It’s probably easiest to set this up in Zapier if the dates are really important. Zapier can iterate through the workout collection and create a customized one for each user based on their sign up date.
  2. Or you label it Day 1, Day 2, etc. You might be able to show the user the date for each workout, without using the date. You can do created date+86400 for day 1, etc. (86400 being the number of seconds in a day), it’d be created date + (86400*5) for day 5 etc.
  3. Lastly, you can add users to a workout to note what they completed or didn’t which will make tracking a lot easier.

Hope that helps!

Thanks Erik!

Yes, option 2 was one of my ideas but creating a “Calendar” with all the “Days” seems a little tedious when you have a bunch of long Programs, right? haha. I’m gonna try that and let you know the outcome.

Every “Day” should have a Relationship data field with Users, right? To track completed days

Yep, exactly. With 180 days in my program, it’s quite tedious. You’d really want to do it w/ Zapier.

You’re also right that every “day” should have a relationship (M2M) with users.

For bulk create, I am using sequence collection to iterate.

Just mentioning in case it suits your use-case.

Hi @Yongki - can you tell us briefly how this works? Looks cool!

Hi @Erik ,

This idea came from all Experts in this forum including you, I have watched every videos and tutorials more than once, sometime maybe close to ten times. :grinning:

As far as I remember, @Victor came up showing countdown as way to bulk action, because Adalo don’t have one yet.

And what Adalo don’t have is loop function that iterate, so to do that we need interim collection that act as iterator which is sequence master, combined with countdown inside the list, we can duplicate records, which is called generate here.

1 Like

Hi @Yongki, wow that’s awesome! Great idea.

I have some issues applying this, maybe you can come with a solution.
As an Admin you can create “exercises” and “assignments” to users. As a user you can complete these assignments but my problem here is that “User1” complete the same assignments as “User2” and so on.

There is a way for a User to generate his own assignments (Exercises previously created by Admins) and completions?

Thanks again!

1 Like

Hi @nvrjulian ,

Glad that someone find it useful.

By this you mean generate some records.

You can have nested list to update relation property in this assignment collection.

So, first list is users collection, then second list is exercise collection (inside first list).

Then, when you create assignment with countdown located at excercise list, you can use current user, because it is already open in first list.

Depending on how you setup your collections, exercise collection can have dates or id that differentiate from other records.

If you need further discussion, open a new thread is a good idea with you mentioning your database setup.

Regards.