Return list of objects from data type

Hi there.

I have a table in my DB that stores a list of items all separated by a comma. For example, a typical entry in the table might look like “Teamwork, Partnership, Respect, Caring”. These are added in from a multiselect dropdown component in a previous form the user completes.

When I make the call to retrieve the list of items, I’m trying to list them all as a separate pill in the UI. I can’t figure out how to separate them in a way that it takes each one and wraps it in its own pill.

Any thoughts on how best to achieve that in bubble is appreciated.

Hi there,

If we’re lucky, I have developped an app where this exact use case was implemented.

:spiral_notepad:My understanding:

  1. You have a data type that contains a field that is a list of texts;
  2. You want to display that list of texts (probably upon selection of an element of that data type)
  3. My usecase is the following: I have User as data type and each user fills a form where there is a multi dropdown for “softskills”. In my DB, each user has several softskills in a list separated by comma. My app generates a CV where under the section “Softskills”, these softskills are listed inside nice round tags adjusted to the text’s size consecutive to one another with a 10 px spacing.

Here is a way you can go about this:

1 ) Create a repeating group (i will call it RG from here onwards)
Appearance Configuration:
Capture d’écran 2022-11-21 à 19.46.00

Remember the Row and Column cell gaps. You want to have a couple pixels between each list item for good visual design. I used 5 but you can space out more or less.

Type of content: text

Data source:
:warning: I’m going to assume here that your page data source (or some parent group) is already set to “Current user’s xxx” or whatever the parent data type is.

Set the data source of your repeating group to “current user’s Softskills”.

2) Create a group inside your RG for your nice tag wrappers.

Layout configuration

Appearance

This should be set to “Current cell’s text”.
Capture d’écran 2022-11-21 à 19.55.42

I hope this helped.

Regards,

Cynthia

Wow. Thank you so much — I actually learned loads from that and your solution works perfectly.