Display a list in repeating group

Hi guys,

I’ve been trying to find help and resolve this for hours without success now. I have a really simple question.

I want to create two simple lists:

  1. Smoothies
  2. Raw juices

And I want to create a data type “drinks”. After I add “drinks” in their respective lists of either smoothies or juices, I want them to be displayed on a repeating group. There will be two buttons - a) Smoothies b) Juices. Click of the button should change the data source in repeating group and show respective lists.

Can anyone please help me out!

Hi @nzl.lakshay, there are a few ways you can structure this. Since “Drink” is category that parents Smoothies and Raw Juices, you could do the following field structure under the Drink data type:

Drink

  • Name (text)
  • Type (text)

Drink 1

  • Name = Mango Blast
  • Type = Smoothie

Drink 2

  • Name = Carrot Energy
  • Type = Raw Juice

Drink 3

  • Name = Peanut Butter Choco Protein
  • Type = Smoothie

etc.

Your repeating group would be a Search for Drinks, where the constraint is on the Type field.

Default could be: Search for Drinks with no constraint

Click “Smoothies” button > Display List in RG > Data to display = Search for Drinks where Type = Smoothie

Click “Juices” button > Display List in RG > Data to display = Search for Drinks where Type = Raw Juice

Another button to “Clear” would run the “clear list” action to return to default (unfiltered).

This is really just ONE way to go about this, but hopefully the concept helps you move forward.


Gaby at Coaching No Code Apps (formerly Coaching Bubble)

Courses & Products, Tutorials, Private Coaching, and High-level Development

Start Learning Today :mortar_board:

Hi @romanmg,

Thank you so much for your response and your assistance. I tried to implement your solution but i’m not sure where I’m going wrong, I’m still getting errors. Does this data structure seem right to you?

Could you please also advise what I need to do on the second screenshot? If its easier, could you please advise how I can share my app with you so you can have more understandning?

Many thanks in advance for your help!


Hi @nzl.lakshay,

Make sure you add a text element to inside the repeating group cell so that you can actually display values. The text would be a dynamic expression like “current cell’s drink’s name”

Next, make sure you have a few drink records created in your database, which you can do manually from Data > App Data. Create a few with a name and a Type.

With a few records in the database, and your repeating group set up with just “Search for Drinks” (you can remove the constraint you have, you’ll be able to see all drinks.

The buttons can change that data source by triggering a workflow action “Display List.” The data to display would be the same Search for Drinks but with a constraint of “Type = Smoothie” or Type = “Raw Juice”

If you have drinks in your database where type = Smoothie or Raw Juice, then these workflow actions will filter the list appropriately.

Hope that make sense!

Hi Gaby,

Your method works perfectly when I add data directly to App data and display it on repeating group.

The issue that I’m facing is when I have database complex than this. I am creating shops which serve different categories of drinks and food. For ex- Smoothies and Raw Juices. When I sign up these shops, I will be filling out a form to store menu of each shop in the database and then display it when users open this shop on the web app. The create new form shop looks like below.

When I enter data in input fields 1-5, choosing respective types of drinks from dropdown, I need them to be added to the list of smoothies/juices.

When the page for the shop is opened, there will be three selections to choose from

  1. Smoothies
  2. Raw Juices
  3. Food

With selection from any of the options above, I need the data source of repeating group to be changed so it can show Current shops smoothies or Raw Juices or Food’s list in the Repeating group text.

I am really looking forward to hear from you and as this might sound complex, I believe if i share the project with you, you’ll have a better understanding.

Many thanks

The design for shop’s home page looks like below

This is how my data structure looks like

@emmanuel Will be really great if you or the team could chip in as this has really halted my progress.

Thank you!

I suggest posting a link to your editor with permissions set to “Anyone can View,” either in this thread or as a PM to @romanmg or myself.

What you’re looking to do is pretty standard functionality, so I’d be willing to bet there’s just a super tiny hiccup somewhere that’s causing you to not get the results you’re looking for. Getting eyes on the editor would have it resolved pretty fast!

1 Like

Hi @nzl.lakshay,

Thanks for the extra details! I understand what you need to do. Now that I know more, I’d change the following in your database:

Instead of separate fields for smoothies and raw juices under the Cafe type, just have 1 field called “Drinks” which is a list of Drinks.

Then, under the Drink data type, add a new field called “Cafe” that is type Cafe.


Before you fill in the drinks menu, I would actually create the shop first. It’ll make things so much easier.

  • Put the entire form inside a group. Set the type of content of the group to = Cafe
  • Put the Drink Menu part in another group with type of content = Cafe, data source = parent group’s cafe
  • Make the drink menu group not visible on page load (in other words, hidden by default)
  • Add a condition to the drink menu group: “When parent group’s cafe is not empty > This element is visible (check the box)”
  • Have the submit button above the drink menu group (outside of it)
  • So, when page is first loaded, all you see is the top part of the form and the submit button

When Submit is clicked:

Step 1- Create a new shop

  • Cafe Name = Input cafe name value
  • Business Name = Input business name value
  • Location = Input location value
  • etc.

Step 2 - Display data to the Drinks menu group, data to display = Result of step 1

Now, the drinks menu will appear and is able to reference the cafe record.


Ok, now for the drink menu, instead of separate inputs/dropdowns for each drink, I would use a repeating group. Type = Drink, Source = parent group cafe’s Drinks (the replacement field I mentioned at the beginning).

Put a single input element and single dropdown element inside the repeating group cell. The dropdown Set the initial content of the input to “Current cell’s drink name” and the initial content of the dropdown to “current cell’s drink’s type”

At first, this repeating group will be empty, so have a button somewhere to “Add a Drink.”

When “Add a Drink” is clicked:
Step 1- Create a new drink > Cafe = parent group cafe
Step 2 - Make a change to parent group cafe > Drinks add result of step 1

Now, trigger workflows when the input and dropdown inside the RG are changed.

When Input’s value is changed:
Step 1- make a change to current cell’s drink > name = this input’s value

(same for dropdown for type)

Now you can add an infinite number of drinks.

THE END!


Gaby at Coaching No Code Apps (formerly Coaching Bubble)

Courses & Products, Tutorials, Private Coaching, and High-level Development

Start Learning Today :mortar_board:

Hi Gaby,

Thank you so much for taking your precious time out and helping out in such a detailed way. I have been away for last 2 weeks on Christmas break and didn’t have my laptop. I hope you had a good Christmas and a great start to the New Year!

I understood everything and I’m just stuck at the last part of your solution. I am not familiar on how I can trigger a workflow when input or dropdown’s value is changed. Please let me know :slight_smile:

Hi @nzl.lakshay, hope you had a nice holiday!

If you go to your workflows > Add Event > you’ll see “An input’s value is changed”

See screenshot:

05-14-27-07

It’ll ask you to select the input, and you should be able to take it from there.

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