50$ RepeatingGroup does not show newly created thing (SocialAssessment) after workflow – data exists in DB

Hola, estoy desarrollando una aplicación en Bubble para un entorno hospitalario y necesito ayuda para implementar correctamente un flujo muy concreto relacionado con valoraciones sociales.

En la página “pacientes” (tipo de contenido: Patient) quiero tener dos zonas claramente diferenciadas:

  1. Una zona superior llamada “Social Evaluation”, donde el profesional escribe una valoración social en un input multilinea y pulsa un botón “Analyze with AI”.

  2. Una zona inferior llamada “Previous Evaluations”, donde deben mostrarse las valoraciones sociales ya guardadas, en forma de historial.

El comportamiento que quiero es el siguiente:

– El profesional escribe una valoración social en el input.
– Pulsa el botón “Analyze with AI”.
– Esa valoración se guarda una sola vez en la base de datos como un objeto del tipo SocialAssessment.
– El texto escrito desaparece del input (el input queda vacío).
– La valoración recién guardada aparece abajo, en “Previous Evaluations”.
– En “Previous Evaluations” solo deben mostrarse las valoraciones ya guardadas, nunca el texto que aún no se ha guardado.

Es decir: lo que se escribe arriba debe desaparecer de arriba y aparecer abajo, una sola vez.

A nivel de base de datos, el objeto SocialAssessment se está creando correctamente. El campo evaluation_text tiene contenido, la fecha de creación existe y el objeto aparece en App Data. También se guarda el patient como Current page’s Patient y el professional como Current User.

El problema es que el RepeatingGroup de “Previous Evaluations” no muestra ningún elemento, aunque los SocialAssessment existen en la base de datos. He probado diferentes data sources, incluyendo:
– Search for SocialAssessments sin restricciones
– Search for SocialAssessments con la restricción patient = Current page’s Patient
– Ordenado por Created date
– Con y sin “:items until #1

En ningún caso aparece ningún elemento en el RepeatingGroup, aunque los datos existen.

Además, en una versión anterior del proyecto el comportamiento era el contrario: aparecían muchísimas valoraciones repetidas, lo que indica que en algún momento el enlace entre guardado y visualización sí funcionaba, pero ahora está roto.

Lo que busco no es nada complejo a nivel funcional: simplemente un flujo tipo “input → guardar → limpiar input → mostrar abajo una vez”.

Cualquier ayuda para identificar qué está fallando (data source del RepeatingGroup, tipo de contenido de la página, relación Patient–SocialAssessment, orden de los pasos del workflow, etc.) sería muy agradecida.

Gracias.

Hey @arturoromerodnb :waving_hand:

I suggest removing the condition on Step 2. Sometimes it might not be referring to the right input. See if that helps. :blush: It might also be a privacy rule issue. Just two ideas for you to check out. Hope that helps.

Running a step-by-step and using the inspect tool is the best way to debug it. See if the workflow actually runs and if it has all the data that it should. Sometimes the Inspect tool will also show you anything being restricted by privacy rules as well.

1 Like

Hi! Thanks for the suggestion :blush:

I can’t remove Step 2 (Create a new SocialAssessment) because that step is essential in my flow:

  • The text written in Social Evaluation is sent to the AI

  • The AI analysis is then used to populate the cards above (via states)

  • At the same time, that same text is saved correctly in App Data (I can see the SocialAssessment created with evaluation_text, created_date, etc.)

So Step 2 is running and the thing is created in the database.

The problem is only in the UI:

  • The RepeatingGroup “Previous Evaluations” does not show the saved item, even though it exists in App Data

  • Privacy rules are already open and not restricting access

What I want is very simple:
After clicking “Analyze with AI”, the text written in Social Evaluation should disappear from the input and appear once in “Previous Evaluations” (not duplicated).

Right now it either shows nothing or shows many duplicated items depending on the setup.

I can see in your attached screenshot that patient is not being saved and you have a constraint on repeating group for patient = Current Page’s patient. You can check whether patient is being set at Current page or not

Secondly add debugger to inspect data source of Repeating group and also debug the steps of AI Analyzer button workflow to see what is actually being created there