Hi everyone,
I’m building a hospital social work
simulation app in Bubble, and I’m currently facing an issue displaying a value returned from an API.
What I’m trying to achieve:
When a social worker writes a social evaluation and clicks a button, I send that text to the OpenAI API to calculate a readmission risk (0–100). Then I store that value in my database and display it in the UI as a percentage.
What I already have working:
-
API Connector set up correctly (POST to OpenAI) -
The API returns a number (e.g. “75”) -
The value is saved correctly in the database (field: readmission_risk, type: number) -
Each entry is linked to a Patient -
In App Data, I can clearly see the value being stored
My workflow:
-
Button is clicked
-
Create a new
SocialAssessment -
Call API (
get_readmission_risk) -
Make changes to thing → save
readmission_risk
(Result of Step X’s message content → converted to number)
The problem:
In the UI, I try to display the value using:
Search for SocialAssessments:first item's readmission_risk
(with constraints: Patient = Current page’s Patient, sorted by Created Date desc)
But in preview, the text element shows empty (or just “%”)
Even though the data exists in the database
What I’ve already checked:
-
Constraints are correct
-
Sorting is correct
-
Field type is number
-
Value is definitely saved (confirmed in App Data)
My question:
Why is the value not displaying in the UI after being saved?
Is this a data refresh issue, or am I missing something in how Bubble handles newly created data?
Any help would be really appreciated ![]()

















