Forum Academy Marketplace Showcase Pricing Features

Displaying a repeating group as a simple list

I’m looking to display a repeating group as a simple list but can’t figure it out. It’s always shown in the uniform cell grid that I have to specify. I really need the cell widths to be the variable width of the content. The image below is a mockup of what I’m trying to achieve.

I’ve even tried doing it as a textbox rather than a RG and converting the data to a list. This works ok as a test when I’m just using one field but I need to use multiple fields (first name, last name, company) and make them clickable links.

Any ideas of how to achieve this?

As far as I’m aware - and I’ve spent quite a while scouring these here forums and trying to figure it out on my own - there’s no way to achieve variable widths for a repeating group.

Here’s how I’ve done a similar thing in the past - below is the setup for this test app: You basically end up with something like this:

FIRST: Person Link Field

  • Create a field in each Person data type for the person’s “full link” (name + linked company name)
  • When you create a new Person Thing, add the info for that field as well.
  • Use html to style it the way you want (see below for example).
  • Note that the URL must be http:// rather than www so you might need some regex stuff to get that right (otherwise, it’ll try to open in your Bubble app and send the user to a 404 page).

SECOND: Custom state
On the page where you want to display the list, create a custom state with Person as the type. Mark that custom state as a list.

THIRD: Create the list on the page
Just add a text element on the page where the dynamic data is the custom state’s list.

FOURTH: Populate the text element
Somehow you have to get your repeating group items into that custom state list. In my example, I have a trigger (button) that sets the state list with the repeating group’s list of people.

If you don’t want the repeating group on the page, you can set the state in an “on page load” workflow using the same search variables you’d use for a repeating group. The issue with this is that if that list changes, you have to re-set the custom state with an updated list. You can see I have an “Add Person” form on my page, and the submit button has a step in the workflow that resets the state with the new search (the same search as you have in the page load workflow), which will now include the person that was just added. If you do this, I’d use a custom event in your workflow so if your search needs to change, you only have to change it in one place.

1 Like

@heythere Very nice tip :clap: :clap: :clap: :slight_smile:

1 Like

@heythere thanks for such a comprehensive explanation and solution! :+1:

It does seem like we have to go through a very convoluted route for something so simple though. The really frustrating thing is that the following does pretty much what I want with just a text box. But because I have the fields separate (first name, last name etc) I can only reference one field. Unless of course, you know any different? It would be great if it could have something like “AND lastname” after the “firstname” field in here!

Woah, @richard16 your way is way better. I’ve never used the :converted-to-list function.

So really you do use exactly what you’re wanting to use - the only extra step you need is to create that extra field on the Person record that combines all the elements you want in your list.

Set that up in the workflow when new people are created and then set up a back-end workflow that goes through already-existing people and populates the field.

Easy peasy. Two steps and you’re all set, right?

Thanks! And yes, I remembered about the :converted-to-list function which nearly does what I needed. As you say, the easiest way is probably just to add that extra field with the combined data and do it like this. I’ll just need to run something that does all the existing ones initially.

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