Disappearing data in reusable element

I’m building a property management app. Within the app is a task management system. When a new property is created, a “project” is also created at the same time and is related to the newly created property. This works.

When a new task is created, it joins to the project. For example, I could be on a property page in the task management area > create a new task > new task thing created and joined to the project relating to the property I’m viewing. When looking in the database, this also seems to work. So I have tasks related to the parent project, and the parent project is successfully joined to the property.

When I create the task it is visible in the correct repeating group for the status it was created in, until I refresh the page. I’ve checked privacy permissions and to make sure it wasn’t this, I temporarily made all tasks, projects and properties viewable to all users (my app isn’t live yet).

Task creation is being handled in a reusable element. The reusable element has “projects” property, which expects a list of projects. This is so I can use the same element in a general tasks area, where a user can see all their tasks, in addition to only showing tasks related to a property the user might be viewing.

The repeating group responsible for displaying the tasks looks like this.

If the user creates a task in a specific property (project) I handle this by having a project selection drop down which is hidden. The drop down simply selects the first (only) project in the list. Again, looking at the database, this is working as the new task has the projects UID in it.

When using my element on the property page, I simply pass in the current pages property’s project:converted to list into the reusable element.

Any clues what might be causing my task to disappear when re-loading the page?

Have you checked the debugger after reloading?

Check whether or not

  • RepeatingGroup task is finding any task.
  • The RE kanban is being fed with any project

Either of the aforementioned points are likely to blame.

Thanks @ademiguel. Yeah I looked in the debug. No tasks being found but the project is being passed successfully to the element.

Latest development: just tried with my super admin account and the tasks do show when I search for all projects without constraints. Super admin has view access to all fields for all things. I’m a little surprised as I tried that earlier, although I hadn’t removed any constraints in my search when I first tried.

Turned out to be a privacy thing after all. I was trying to limit visibility using privacy rules instead of search constraints. Bubble doesn’t seem to allow us to do the former, but suspect this is intentional as it’s likely more performant and secure to use search constraints (I guess).

This topic was automatically closed after 70 days. New replies are no longer allowed.