Showing score of logged in user

Subject: Unable to Display Scores for Logged-In Users in My Bubble App

Hi Bubble Community,

I’m building an app where logged-in users should be able to see their scores and names. Here’s what I’ve done so far:

  1. I created a data type called Score with two fields:

    • User Name (type: Text)
    • Score (type: Number)
  2. I want each logged-in user to see only their score and name.

  3. I added a Text element to the page and tried to dynamically display the user’s score using:

    Current User's Score
    

    However, the data isn’t showing up in the app.

  4. I verified that scores are added to the database under the Score data type, and user accounts exist.

  5. I set privacy rules to allow logged-in users to view their data.

What I Need Help With:

  • How can I dynamically show the score and name of the currently logged-in user?
  • Do I need to set a constraint or data source differently to link the score with the logged-in user?
  • Is there a better way to structure the data or set up the display?

Any advice or troubleshooting tips would be greatly appreciated!

Thank you!

Instead of displaying the value of the Score field of the Score data type you are displaying the value of the Score field of another data type which is the User data type.

I suggest the following modifications:
1- Replace the User Name field of type text with an Owner field of type User.
2- I guess that the Score field in the User is of type number, if so replace it with a Score field of type Score.
3- add the needed workflows that create and update the Score fields and data things (entries).

Then you will be able to display the score either by using Current User's Score or by using Do a search for Score with a constraint Owner = current user