Subprofiles within user profiles

Hello,

I’ve been using Glide for the past few days, and out of all the no-code solutions, this one definitely feels like the best fit.

At the moment, I’ve come across a problem I can’t seem to figure out a solution to.

So, I want users to access the view/access of different “characters” that are assigned to them. For example,

USER A signs in, and they have control of 3 characters: Christopher Robin, Piglet, and Eeyore.

USER B signs in, and they have control of 3 other characters: Owl, Rabbit, and Kanga.

I was hoping to find a way for USER A to view a character of USER B, e.g., Christopher Robin views Owl’s profile. Christopher Robbins can add their own personal notes to Owl, which can’t be viewed by USER A other profiles (Piglet and Eeyore), or any of USER B’s file. And if it’s possible, it would be the same when Christopher Robin viewed the other “character profiles” and added notes that belonged to USER A, (Piglet and Eeyore).

I hope this makes sense.

Any help would be greatly appreciated.

Sounds very doable.

Two tables:

  1. Users table
  2. Characters table

Create a relation between the users table and the characters table using matching data (email or userID). Create a user specific “notes” column that will allow any user to have their own notes for any character. Point a notes component to this column.

If you’re not familiar with relations, this video will help:

2 Likes

So in your flow, how does user A switch between characters?

1 Like

@Robert_Petitto

Thank you, this seems to have done the trick, and works just as I’d hoped.

@ThinhDinh

I thought I had figured out a way to do this, by using a combination of the choice component with a button/action component, or by having an inline list, filtered by the player’s row id, but now that I’m trying it out, it seems to be a bit of a dead end.

I’m open to any possible workarounds for this, if there are any.

It really depends what you’re looking to do after selecting a character.

Are you just viewing character details? Then simply use a collection of the related characters and display info on the details screen.

Do you need the entire App to be aware of what character you selected (persistent beyond a single screen)? Then yes, you’ll want to select a character via a choice component or collection and have an action that stores the character in the user profile row so that way it can be referenced elsewhere.

2 Likes

Yes, your second example would be ideal. Could it be achieved by using the choice component, selecting the character’s name, and setting the choice to ‘write to User > Role’? Or would it be preferable to write the choice to it’s own column? And will the choice be overwritten each time the user logs on and selects a character?

This is the same thing imo, it’s just about where you want to store that choice. Ideally, store it in a User Profiles column, so it can be referenced anywhere else.

It’s only written to the specific column you chose, in the logged in user’s row.

1 Like

You’re right, it is the same thing. I’ve been configuring with it for a bit now, and the only thing I’m really stuck on is finding the right action to switch between characters, as you previously mentioned.

For example, at the moment I have the Users table, and the Characters table, with each User and Character having their unique Row ID, and linked together via relations, as per @Robert_Petitto’s suggestion.

In its unfinished state, I have the action as: User Interaction with Characters Table, where Character ID is Role… And then I get a bit lost. I thought ‘set column value’ in Notes, but I don’t think that will get me exactly the result I want.

I’m sorry if this is convoluted, I might just have to admit I’m in over my head, haha.

I think you can try using a choice component that will write to a column of your choice through the User Profiles dropdown, and then use that value to configure the related flows in your app.

1 Like

Oh, okay, I understand. I think I’ve just realised the crux of my problem is that perhaps what I’m trying to achieve would consist of lots and lots of rows, because of the combination of notes.

If User A selects ‘Eeyore’ as their character, and writes notes on ‘Owl’, ‘Rabbit’, ‘Kanga’, and ‘Piglet’, then when it comes to User A selecting a different character, eg ‘Christopher Robin’, then they can still see the notes written by ‘Eeyore’ when they click on those same profiles, because the notes are written to the User and not the character as an individual.

The relations column did help separate what the users wrote, just not separately as the characters, if that makes sense.

I really appreciate your help thus far, and if what I’m asking is a little too tedious to achieve, I’ll simply work around it by having the User list their notes with the character they’re ascribing them to, ie:

Eeyore’s profile -

Kanga: likes
Owl: likes
Rabbit: dislikes