Setting favourites on behalf of users

Is it possible to set favourites on behalf of users?
From the reading I’ve done, I’m guessing that the only way I could do this would be to roll my own favourites functionality. But I just wanted to check before I head down that rabbit hole :slight_smile:


You can preview as that user inside the editor and do the favorites.

Hi @ThinhDinh

Yeah, thanks. I was aware of that although that is not a practical option for my use case. I have potentially hundreds of users, and this needs to be done on a regular basis. So I need to have it automated.

1 Like

As of now the favorites is a native user-specific option offered by Glide. If you are willing to do it yourself and put aside Glide’s favorites then I assume you can do that using scripts and formulas.

What’s your use case here may I ask?

Hi @ThinhDinh

Thanks, I suspected that would be the case. My use case is as follows:

My app is used to run a golf sweepstake. For each event, my users will select 3 golfers for that event. So what I want to do is automatically favourite each users selections for each event. Note that the users selections may change from event to event, so I basically need to reset all favourites for all users each time.

Maybe favorites isn’t the best solution here. I would probably set up an array column to input each of the 3 golfers, then use the array column to create a relation to the golfers sheet. You can then display the relation as an inline list.

1 Like

Hi @Jeff_Hager,

Yes, actually I already do this. Each users picks are associated with them via a relation, so when you view a users detail on the pool leaderboard you see something like the following, with their selections presented as an inline list:

Where I’m looking to automate the setting of favourites is in my players leaderboard, which appears as follows:

The idea is that as a user, the players that I have selected will automatically be favourited in this view.
I’m thinking that I’ll probably have a crack at rolling my own. If nothing else, it’ll be a good learning exercise, although I expect I’ll be back here asking for help once I get hopelessly lost :rofl:

I would probably create a details layout screen with a choice component that fills a user specific column. Set the choice component to the horizontal layout so it looks similar to the All/Favorites selector. Then create 2 inline lists and conditionally show each list based on which choice is chosen. One inline list will be the complete leaderboard list. The second inline list will be based on a relation to only show the other players.

1 Like

ah, yes… I get that. I’ll give that a try, thanks!

1 Like

Hi @Jeff_Hager,

I’ve been trying to implement this and it’s been doing my head in, so hoping you (or one of the other experts) can provide a little more guidance. My app contains a lot of personal info, so I prefer not to share it. I’ll try to describe my setup as best I can.

There are 3 sheets/tables involved.

  1. Users - this is my User Profiles sheet and contains the usual info - name, email address, etc.
  2. Realtime Pool - this is where user selections for any given event go. A user selects 3 players, and their selections go into an array column (Players). The sheet also contains the user name and email address. Each user may have one or more rows (selections) in this table.
  3. Realtime Players - this is essentially the golfers leaderboard. It has one row for each golfer, which includes their scores and various other related information.

(relevant) Relations and Lookups that I currently have between the 3 sheets:

  • Users.Picks Relation: links the Users table to the Realtime Pool table via email address (matches multiple).
  • Realtime Players.Picks Key: links the Realtime Players table to the Realtime Pool table via Player Name (matches multiple).
  • Realtime Players.Picked By: shows which punters (users) selected each player by doing a lookup on the Picks Key relation.

What I’m trying to achieve:

More or less what you described in your previous reply. I want to use a choice component to apply filtering on my Realtime Players view, with 2 choices. One to show all players, and the other to show only those players I (the logged in user) have picked.

Where I’m stuck:

Basically at step 1. You said:

No problems with the details layout screen or the choice component, but I can’t figure how the user specific column should be defined, or where it should go (in which table). I watched this (awesome) related tutorial by @Robert_Petitto several times and what he describes there is very close to what I need, but again, the penny hasn’t dropped for me yet :slightly_frowning_face:

Any extra advice would be greatly appreciated.

So, whichever sheet you are using for your tab to display the psuedo favorites will be the sheet that needs the user specific columns to hold the choice value. In Robert’s example, I think he used an existing sheet, which will work, but keep in mind that when displaying the details view for that tab, if you are using any filtering or sorting on that view, the first row it finds will be the row that will receive the choice value. This is fine, but in some cases, I like to have a separate sheet with one row, that will be used only to hold the choice value and nothing else. Either way works, so it’s up to you. Robert’s method makes sense when you have several filters and some, but not all choices are selected. It would work in your case, but I think since you only displaying a simple All/Favorites type of choice, you may be better off creating two inline lists. The first inline list can be un-filtered and show all players. The second list will be filtered by signed in user. You can then set the visibility on each inline list to show or hide based on the choice component value.

The first time a user views the screen, no choice has been made, so no inline list will show initially. What I like to do in these situations is also add a visibility OR condition on the ‘All’ inline list to also show the inline list if the choice value is empty.

These are a couple examples I like to share to show favorites, or favorites like functionality with a choice component. They aren’t exact examples of what I’m describing above, but should give you an idea of what I’m talking about.

1 Like

Thanks for taking the time to respond. I’ll study your answer and the examples you gave.

1 Like

Hi @Jeff_Hager,

Those examples were incredibly helpful, thank you.
After taking a look at your Custom Favorites example, I realised that I needed to add another sheet/table - similar to the Favorites table in your example. Once I had this in place, it all started to make sense. I have it working now.

Thanks again for your help!

1 Like