Need freelancer: Javascript to sort RG dynamically based on thing's thing and follower's base

Hey there, I need a freelancer to help me with a central problem of my app.

I detailed the problem on this thread: Dynamic sorting based on people I follow: HELP!

There is also a very simple demo app: https://bubble.io/page?name=index&id=datarankingtest&tab=tabs-1

Any help would be much appreciated.

Best,
Daniel

Hi Daniel
Hope you are doing good.
I have checked the requirement and I can easily accomplish the mentioned task in minimum cost, You can add me on Sky–pe: gabriel@cisinlabs.com or inbox me at gabriel.cisin10@gmail.com
I’ll be delighted to receive your reply mail!

Regards
Gabriel A.

Hey Daniel, have a look in your app and tell me if it works for you like this?

Maybe I missed something obvious but the RG now sorts on votes based on cities you like and friends you follow like.

Hey @vincent56

Thanks for your reply and for your time helping me out, much appreciated!

This solution was also suggested by bubble’s support. They only issue: when 20 users use the app simultaneously, the data gets fudged. Bubble also confirmed that this would cause issues.

If you see an alternative, let me know! in the meantime, I will initiate the javascript solution and share it on my post once solved.

Best,
Daniel

My RG is below the first one, it uses the original data fields and no extra fields. But maybe I’m missing something?

Hey there,

I only see one RG on the demo app. What happens if 100 users open the page at the same time? The data will change for everyone and the figures will be wrong right?

Best,

No it just uses the database fields to get the same result:

Haa, now I see your point!

Yes, this works perfectly fine but I would like the “Vote” to be based only on the people I follow.

If I follow 5 users, I want to see the ranking based solely on those 5 votes. That’s where it get’s really tricky for me.

Can you fix that with privacy rules maybe?

No, Bubble’s limitation comes earlier. I can’t even rank those cities based on a figure that doesn’t belong directly to the data of the Parent’ city.

Bubble said that they have this function on their roadmap. It really looks like adding some Javascript is the only sustainable solution.

Still looking for one qualified developer for this request BTW. :slight_smile:

Thx again for your help @vincent56!

I see what you mean, this should be possible with Bubble. Hopfully sorting on things thing will become available soon. Still feel this should be possible by default though :confused:

I still think you would somehow be able to do this with a new data type of city rank/vote. There you can filter the db only on votes from users that you follow.

1 Like

Absolutely! This was my last preoccupation when I started building my app. I am surprised it is now such a big issue… my app doesn’t really make sense if I don’t get this working. :frowning:

Anyhow, I will update the forum once I have a solution!

I still think you would somehow be able to do this with a new data type of city rank/vote. There you can filter the db only on votes from users that you follow.

No and that’s the main issue, you cannot “sort by” a field that isn’t a number (or alphabetical order). You can’t insert a dynamic field to “count” the number of friends neither.

You would then have to sort on the Votes data type and filter on creator is in current user’s following or something along those lines. Would be worth to play with maybe.

1 Like

I looked at this only briefly and I am not sure I follow all of it. Some time ago I had situation that required a lot flexibility and was convoluted and come up with an approach that helped me figure things out. Perhaps it can help you reach a solution.

What I did was to a create a number invisible repeating groups that had a sub-set of the data I was looking for and used them as the parting point for other repeating groups. I made these repeating groups visible temporarily so I could view the results at each stage.

Eventually I converted these to states (made of lists/results), instead of repeating groups to hold my data temporarily. Just because I did not need the visual elements.

Perhaps this will help you approach your problem from a different angle, perhaps not. But thought I put it out there just in case.

Wish I had more time to look at it. I love a challenge.

Rick

Just theorising here but what about using the City Rank data type and use that as the data source.

You would then do search for city rank/vote and do grouped by ‘name’ (you would probably have to save the name of the city as a text field as I’m not sure you can group by a connected thing)

Another constraint would be to filter on city ranks created by a user that you follow. You then should only get the votes from the right people…

I would have to work this out, but can’ now…

A problem would be that you get a huge list of Votes things…

Hey Daniel,

I edited the app and added a 3rd repeating group below the other 2.

I set the data source as Current user’s>follow’s>cities liked. This list includes duplicates if it is “liked” my more than one user.

I used the “group by name” feature on the list above and then “sorted by” the count of each “grouping”.

This seems to accomplish what you are trying to do.

Let me know if this isn’t clear.
Nathan