Displaying one item per one row in the repeating group

Hi guys,

I am having a little issue with items in the database that display in the repeating group in one row, instead of one item per line.

This is my first use of bubble io, so not a lot of experience.
image

What should I do in order to display data from the database one item per row in a repeating group?

Thank you in advance,

  1. Can you share an image of how you configured your repating group?

  2. Do you want to display all the avaliable-time of a specific terapist?

  3. The Avaliable-time is a list of text?

Hi rpetribu,

This is my improvement. I want to show one time option per one row (example 8:00am alone)



  1. Yes, I want to display all the available-time of a specific therapist.



Thank you,

Humm… I see.

image

The result of this search is a single Appointmen-time?
What constraints are you using to do this search and what you desire as result?

Because, looking to the result of this search, you are retrieving multiple records :point_down:.

Note that “Avaliable-time” is a list of texts. So, when you write “each item’s Avaliable-time” you are dysplaing the list of Avaliable-time of every result from your search. That is why you have those lists…

View every list is not the same of view every element from a specific list.

That is why you are displaying a list of lists. And not a list of texts.

I have no constraints for this repeating group.
Is there a way where I can put some constraints to display one appointment time per row, and not like this all in one row?

Results of this are only rows with all appointment times together and I don’t want that.

admittedly this is a difficult problem to solve at the start.

Lets start with learning number 1.
Just for practice create a datatype Restaurant.
Give restaurants a field type text called restaurant name
Go to data app data and add 5 rows, in each row add a different restaurant name
Now use a repeating group with do a search for restaurants
Inside it put a text item saying Current cells restaurant name

That gives you one item per row in the repeating group
Why? As the field is not a list of texts but type text

Now for your problem.
You want to give people options to book appointments i am guessing.

You created an option set to give options. Fine
Each option is one time. Fine

Now you create a repeating group that has as datasource the optionset. (Get option then select all options)
Then in row 1 of group put a text called option sets display.

Now the user should mark which hours they are available.
In the same repeating group make a button that says available (later can be an icon or checkmark anything)
When they click available. You create a new thing type User Free.
This saves the option sets time as well as the user .
That way you can later get another repeating group with content type User Free, source: “Do a search for User Free” where user = current user and display the times in that.

What you did here is 1) show all options 2) get users to add just their options 3) display just one users options.
General things like times you save in optionset. But user specific things like which times John or Joanne is available you save in the database.

What about lists?
Joanne could have a list of favourite User Times. (so a list of User Frees)
As it is a list we can use a repeating group to display Current users list of User Frees.
In each row is one text saying Current cells list of users frees Appointment Time Display
However, the way Bubble works lists should only be used with very small lists not large ones. It is superior to just use Do a search for all User Frees where User = Joanne to find times of Joanne. Only for something like favourites, a list of User Frees provides superior performance.

At a later point you might want to also select days and months in a calendar and save them as dates. Not an easy task. Will create a tutorial on this some time as it often comes up.

1 Like

TipLister, thank you for your help. Unfortunately, I couldn’t separate time slots as I wish.
I did some research and found the type of displaying data with “nesting repeating groups”. I managed to display from option sets each time slot separately (one per row). But when I set seach for user’s available time slots, again it shows them together in one field.
What do you think about nesting groups and could here be a possible solution? Please check the attached file.




Thank you,

@TipLister Forget this nesting group reply that I wrote yesterday.
I just want to thank you so much.

You are the man! :cowboy_hat_face: :sunglasses:

glad you finally found it and thanks for your kind reply. sorry I really felt bad for you not answering but had no time to make a youtube video yet, which seemed needed as that was the wrong rabbit hole you ended up going down with nested repeating groups.

to help explain nested repeated groups consider this.
You might want an admin dashboard for yourself to better get an overview of each of your therapists time slots.

To do this you might want to use such a nested repeating group.

Specifically an outer repeating group would be “do a search for users” where type= therapist or something similar

And then inside row 1 of that you add a text showing therapist name for instance but also a repeating group
and that repeating group has as source: do a search for user User Frees where User= current cells user (that therapist) and put in a text element displaying current user frees appointment times display.

that way for each therapist you see availability times.

Just another quick question. As you can see I managed to separate times slots. Now, when therapist during his process selects available time slots each is created separately. But when I display these time slots in the repeating group it displays all times slots from all therapists. When I set a constraint to therapist = name from page url, I got no results for time slots.


image

Do you know where I am making a mistake?

Hi Jasmiin,

What is the URL of the page it is not working on, could you share that here?
I ask as you seem to be attempting to get the therapist from the URL.

If you click into where it says “Get ime from page URL” could you please screenshot what you see then

https://ubridgeioapp.bubbleapps.io/version-test/patient_view_psy_calendar?debug_mode=true&ime=Rasko&date=&therapist=1%3A00pm&price=111

  1. do you set the slug of every user and therapist?
  2. is the page type user or type therapist
  3. if instead of ime=Rasko you have ime=123 where 123 is the unique ID of the user Rasko which you get from the database, does it work?

if still stuck please watch these explainer videos

  1. I added now to set a slug for each user.
  2. Therapist (type of user - text) is just data field inside user data type.
    It should be page type user.
  3. When I click on the page where I should select time slot for a session, in the page url it is unique id from totally different user in data base. How I am supposed to set to change that?

URL:
version-test/patient_view_psy_calendar/1647885295377x134893967639472930?debug_mode=true&ime=Christian%20Bale&date=&therapist=1%3A00pm&price=654

1647885295377x134893967639472930 this unique id is from different person, probably because of it it would not show me time slots for just one therapist.

if your page is type user, then the url parameter must say type user and the url must contain either the slug of that user or the unique id of that user to be able to fetch it from the site.

to test this create not a repeating group but a text field which says “Get data from page url” with parameter ime type user. 's name
your goal is to create so many urls until you find one that actually displays the right name.

if your page were yourdomain . com /user
then if your user has unique ID 123 or slug john
I would except the right URL that works to be yourdomain . com/user/123 or yourdomain . com/user/john

watch the full video playlist if still stuck.

Thank you for your help. I will check it out again and dig deeper to understand. Maybe I am just tired. I will let you know if I solve it.

Sorry if I bother you too much.

admittedly bubble is hard to learn at the start. it just takes time.
i too used to be a non techy in your position.

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