Display Data to Page element not working?

Having trouble displaying data on page. Seem’s like a bug but thought I’d post here first in case I’m missing something.

Here’s the scenario:

  • Users are a part of multiple Groups
  • Index page is set to type Group
  • On page load, display data:current user’s first group

Specific workflow:

When Page is Loaded and current user is logged in,
Display Data to Element index
Data to Display: Current User’s Groups:first item

But it’s show that it’s incompatible. Any suggestions?



What’s the error that it gives? There should be an explanation in the issue checker.

Knew I was missing something.


Is it possible that you have two things named Group, and are choosing the wrong one?

There are only 5 data types in the first place so it seems unlikely.

One thing I did look into was whether I had any deleted Data Types of fields with the same name that it could be confusing, but all of the names have been identified as deprecated in the database.

The Group has a field List of Users as well, so I also tried to use Do A Search For Groups where field Members contains Current User. This got the same result.

Only other thing I can think of is that for some reason “Group” is a reserved word, but that’s seems unlikely.


The error says that “index” is not expecting a type of thing at all, but you’re sending a Group to it. Which is weird, because on your page setup, you’re explicitly pointing out that you want a Group to be the type. Might be time to send a bug report.

Just wanted another set of eyes on it before I did.

Thanks all!

Got it! It looks like you’re trying to use a display data action while on the current page. This will result in an error because Bubble does not let you run a display data action to update the current page’s data. Rather, this is done via navigation.

What I recommend is steering away from setting a type for the page. And rather, to send it as a parameter. (Beyond this, if you were to draw a group (the element) on the page, and set that Group’s type to Group, you could update it while on the current page.

Or, use a “Go to Page” action, that navigates to the same page, and in the data to send field, add the "Current User’s groups:firstitem… (Note: not recommended because you’re using this with a page load condition).

I may recommend steering away from “Group” as the name of a thing in your database since new groups (the element) name themselves using “Group”. :smiley:

1 Like

Thanks so much for the help dan.

Just out of curiosity, is this something you recommend as a general best practice?

In the data model almost everything relates to a Group, so my thinking originally was that by setting the page type to Group I would need fewer “Do a search for”'s as those seem to slow the page down more than anything else. If I need to sacrifice performance to get it to actually work, though, it’s any easy decision haha.

Are there any additional security concerns with using the parameter/state method vs page type? Silly question, but I haven’t had time to dive in to Privacy/Roles (would love some resource recommendations or example projects if you know of any).

Didn’t think twice about naming them Groups until now…doh

Thanks again!

Responding in a list; roughy matches up with your questions. :smiley:

  1. For setting a type as a page, I only utilize on very rare occasions. What I do instead is to make use of defined parameters and reference information in relation to the current user.

  2. Do a search for actions are actually pretty fast. How you construct things (whether its filtering a defined list associated with a thing or doing a search based on specific constraints) is more important (My opinion: a poorly constructed filtered list will slow things down more than a well defined search).

  3. Regarding privacy concerns. I try to keep “sensitive” data in parameters to a minimum (or things that could be manipulated - ex. passing a value like “users_credits=500,” which your page references would be a very bad idea. (Because the user could easily manipulate the value).

  4. For homework, I really recommend exploring privacy roles and data conditions. Having well constructed database privacy roles, page redirects and user-based permissions is significantly more important than what may be exposed in the URL. Will see what resources I can find…

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