Problem - visibility and filtering by relation database

Hello,

I’m working on e-learning app with some gamification features. Generally I want to give user new pieces of info to learn everyday. I want to show only few tasks that need to be done out of many. All others should be hidden with some info how many tasks user has to finish. So generally speaking I want to show how many tasks user has to do.

The flow looks as following:

  • user sign up for the course.
  • then everyday she receives new tasks to do basing on some pre-made course structure
  • everyday she sees all the task she has to do. If there are more than x tasks to do, I want to hide rest and show → “hey you have y more tasks to do”

Here how it works:

  • when users signup, I generate course_signup with relation many to 1 user and to the course.
  • course has a list of tasks to do.
  • as I cannot generate all tasks for the user when they sign in for the course (can be do with external code but it is too unreliable at this moment as I’m not proficient with writing code, tools like integromat have limits on number of actions) → so I just show user general list of tasks basing on the day from the start of the course by filtering through current_course_signup → course → tasks (called course_unit)
  • when user finishes a task I just add to “task” record a user (through relation many to many). Then I filter task that are done by the user.

So where is the problem :wink: the problem is that I want to show the counter of tasks if there are more than x task. The counter is working, however I have problem with hiding it if the counter is less than y. My initial idea was to count all tasks in particular course that are overdue or actual (by comparing “day_from_start” record in “course_signup” to “day of the task” from “task” which is actually relative day from the start (like 1st, 2nd and etc) and filter it with the “tasks” done by the user (filter those “task” depending on whether they contain loggedin user in a record “finished by”).

I’ve done it for the counter:

But I cannot do the same for the visibility. It just do not show “logged in user” :frowning:

Do you have any idea what can I do? Is it a bug or something like that?

Hi @gskrypka !! :wave: :wave:

Try to put the logged in user email first and then does not contain and then the one you put first.

Thank you :blush: :blush:

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