Make a random user appear every day, who is not the same

Hello to all,

I kindly ask if anyone wants to help me understand how to implement my idea. I have tried various ways and I do not jump out.
This is what I would like to do:

In a special page I would like to make another user appear randomly (to logged user), but that every day is NOT the same.
It is possible that the user appears again after at least 30 days, in order to propose new people.

I thought about creating a “Random” collection where I will save the logged user & Random user association and the date when it happened.

In a second I thought of using the random picker for the “User” collection. But here I find it difficult, how can I compare it with the “Random” collection to check that the random user is not already associated with the logged user in the 30 days? In order to propose a new user?

Thank you all!!

Hi @miticobeppe ,

This is tough, but if you persist, you can try something like this.

Have a pre-filled “show up user” collection which contains for example 99 records, in this collection, have id as number and show up as date, it is useful for filtering and doing conditional.

Have action to get RAND function and call interim screen, which is batch processing.

In this interim screen, have a nested custom list, in the outer list is users collection with no filter, sorting by id, in the inner list is show up collection that is filtered by current user in outer list.

Put countdown in inner list that check if the random id from RAND in previous screen are matched and validated as in date before 30 days (or other conditionals) and if does not find, it means this random id is valid to use.

If countdown can find it, it means not valid, hidden input can be triggered and then link back, so the user can hit action again to generate another random id.

That is all I can think right now.

Hello and thanks for your kind reply.
But the question of the timer is not very clear to me. Can you be more detailed?

do you think it is impossible to create such a thing?

For countdown component, you can check @Victor posts, he made an excellent explanation and videos.

It seems possible to me, but I can’t be sure, previously I make mistakes for predicting without experimenting. :grinning:

Thanks…Another idea?

I’m trying to put all the pieces together before developing … as I think it’s not going to be very easy.

Hi @miticobeppe @Yongki,

As for me, this task seems to be more complicated than it looks.

  • selecting a random user should be easy (just make a unique numeric ID for each user, and run a RAND function, be sure that IDs are sequential and you know start and finish)
  • excluding logged-in user is a bit more complicated
  • storing all “seen” users, and excluding their IDs is even more complicated, though possible (sometime ago I did some case to “re-run” the regeneration of random number, if it already existed before)
  • but “removing” the “seen” user after 30 days is quite challenging. Here we need to create a “matrix” of “who-seen-whom” users, with “date of exposure”, and somehow empty this “matrix” after 30 days period. In Adalo’s case, this could be a separate collection of “Viewer” - “Viewed” - “Date” (M2M relationship is not enough).

I’d say that it is possible to achieve all this, but it will definitely require some time to think how to do it :slight_smile:
I was also thinking about Random Picker custom component, but still not sure if it could be used. Most probably the final solution will require Random Picker + something like Integromat.

Best,
Victor.

Good morning Viktor,

thank you for the answer. I am still stuck.
Yet it seems like a widely used method on the net, for example tinder: it never offers you the same people, because it knows that it has proposed to you a few days before.

This is what I would like to do. Just don’t propose to the (logged) user the same person who saw 1/2/3/10 days before, in a totally random way.

It’s very complicated…

I had thought of a User-User collection. Where to save the names or codes of the users who have seen each other and the date.
Then check that the user who randomly happened to the logged user is not already connected to it … and if it is, the date must have exceeded 30 days.

The thing that scares me the most is how to randomly extract users and then discard them based on whether they are already logged in to the logged user.

Cheers…

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