Forum Academy Marketplace Showcase Pricing Features

How to make a repeating group search for two types of things

when I have my repeating group search for 2 types of things my repeating group just ends up blank is their any way around this?

You might need to be more specific in your question - is it the same problem as I am having? This is:

There are 2 tables in the database, let’s say Dogs and Cats.

I have a dropdown that contains Dogs and Cats options. When the User selects Dogs, the Dogs search results should display in the repeating group, when the User selects Cats, the Cats Results should display in the repeating group. I am attempting to use the same repeating group to display the results from both tables.

Is this possible and how is it done?
(Things I have tried fooling around with are States, Conditions, and show/hide different Repeating Groups but I have a feeling it’s maybe more simple than that and maybe to do with how you are supposed to set the tables up).

Is that your question as well?

Jess

Yeah its the same thing and if you put in 2 (types) the repeating group wont show up at all

You’d have to use two repeating groups, since we need to know what is the type of the group to enable the current cell’s thing properties, we can’t have two types in one same group.

2 Likes

Emmanuel does that mean that if I have 10 options in the drop down (an option = the name of the database table), i need to have 10 different repeating groups on the page? And I use Workflows, Conditions, or States, to show and hide them depending on what the User selects in the drop down?

unless there’s another way I’m pretty sure what you just described will work.

wouldn’t that mess with the order of the page like if i put search type Post for the first repeating group and then put Search type Repost for the second repeating group wouldn’t the order be weird like (Post, Post, Post, Repost, Repost). Instead it being random like (Post, Repost, Post, Post, Repost)

I hope that makes sense I want it all to descend from created date.

Ok, thanks, just checking that’s the correct way to build this.

Can I at least make it so that a repeating group will not show a certain type of post for example ( If type = Comment) this type of post is not visible in repeating group?

I figured it out, Repeating group had to say type doesn’t contain Comment in do search for, options. Thanks for some of the help :grin:

Following up on this. I have two content types, each are their own things in DB (though happy to make them one thing if that can work).

  1. Photo
  2. A Quote (text)

I’d like a stream where the both the Photo and the Quote show in same repeating group, listed in descending order by date (standard stream). Is that not possible?

If the photo and the quote are linked, then it is going to make far more sense to link them together.

So you can have a field on Photo called RelatedQuoted, of type Quote, so you just have the RG as Photos and pull in the Related Quote.

Thanks, but they won’t be related. I guess the easiest way is to think of this as Tumblr. In Tumblr you can create several types of posts, all with their own fields:
Text
Bookmark/link
Photo
Video

Of course, those all display in your single stream on Tumblr. How would that work with Bubble or is it impossible?

The way I’d do it would be to first create a type of post.
Then the post type could have fields to incorporate any or all of your needed properties. This way you could have a bookmark accompanied by a photo if needed.
And showing them in a repeating group (i.e. stream) is now really easy - just have the elements in the cell to show up or hide according to the existence of the data they would display.

Another way would be to create the different types for text and bookmarks and photos and whatnot that’s needed. And then a master type (post) that can contain any one of these and can be easily displayed in the stream. IMHO that would make the data equations more difficult and probably necessitate having different hideable groups in each cell that would show up when a type of data is present in post.

2 Likes

Then the post type could have fields to incorporate any or all of your needed properties. This way you could have a bookmark accompanied by a photo if needed.

Yep, I would then add 3 groups (text,photo,link) to the Group “Post” each one of which would simply be collapsed\invisible in case user did not enter anything to those, and that would fit all possible combinations of content in a single post, like in Tumblr.

2 Likes