Sorry - this is probably a very basic question, but something that is stumping me right now.
I have a RG of users, sorted, and I want to show text above the RG telling the Current User which number they are in the RG list.
I know it would be Cell Index, but I can’t think of how to extract the Cell Index for that particular user.
Am I embarrassing myself here? Is it completely simple?
Hey there, im not sure if im understanding 100% your question.
So you want to show the cell index for only current user? Or all users can see the other users number?
Btw there’s an example how to show current cell index:
Yes - I want to show it for just the Current User, but not in the Repeating Group… In a text above the repeating Group.
I have a leaderboard showing Rank # for each cell (e.g. Current Cell’s Index).
Above (and separate to) that RG, I want a text which says… Your Rank: #?. It is that ? which I am not sure how to achieve.
What criteria are you using to sort the users?
I am not aware of the ability to access the cell index of a repeating group from outside of the repeating group. The cell index is not part of the underlying data source that feeds the repeating group…it is more of a derived value, which Bubble doesn’t seem to expose. So I don’t think there is a way to have your text area at the top say “Repeating Group User’s List of User’s Cell index”.
However, this intrigued me so I found a work around for your case. First, you need to enable the “Expose the option to add an ID attribute to HTML elements” in the General settings tab of your app. In the text field that you are using to show the “Your rank is #” info, put a name in the ID attribute field. For demo purposes, I called it “currentUserRank”
Then add the “Components” plugin made by the folks at CoBubble https://bubble.io/plugin/components-1504367351709x922713012766769200
Here is my demo of this (note in my demo I used an input to get the comparison value instead of Current User so that I could test it with different names)
and here is the editor so you can see what I did
If you’ve solved it - thanks very, very much.
Must admit - I assumed it was a simple thing I was missing - would have thought this would be a fairly common requirement.
This topic was automatically closed after 70 days. New replies are no longer allowed.