Search for ... any item from another search

Hey there community.
Is there any way to use a search for command, that will search for any records that have any (one or more) of the other search result items.

I have table of orders. They have unload date - by which I group them in weeks.
I have 7 other tables which I want to check - what items have any of those order nrs (can have one or more) and calculate their values from one of their fields.

Anybody solved that kind of case?

Still looking for answers :slight_smile: found some inspiration regarding the fuzzy search plugin, but this is not a solution I can apply here (rather in the search bar).

What is your actual data structure? That will help figure out how to do this.

1 Like

Hi Tyler.
The data structure is as follows:
Table of orders: order id, from, to, some order details - main key is the order id
7 other tables, which have different items regarding the procedures - name, details, values, descpritions etc. (Which i want to display) and they all have order ids relevant for each procedure.
I would like to display the values of all elements that have any of the order id within a date range (meaning first I do a search for order IDs and then I want to look them up in the database as a key to filtering items.
This is the challenge I have.

Dear hive mind… any ideas maybe?

I must’ve missed your reply 2 weeks ago…

Since you are working with like 7 different datatypes, you need to have a separate RG for each, each one searching for what you want. Any reason these aren’t on the same datatype if they all are tied to an Order?

Also Bubble we store the actual Order in an Order field, not text of an order_id. That makes this a lot more complicated not having the “Bubble relationship” between datatypes.

You can nest RGs as well, so you can have your primary RG searching for Orders, then inside that search for one of your satellite datatypes with the constraint order_id = [the order’s order_id]. Again Bubble relationship would make this a lot easier.

Hi Tyler.
Maybe I explained something in a false way so I will try to correct myself.
I am using currently a prosthetic solution which I am pasting below.

But what I want is to:
I have a database of orders and another database (let’s remove the other same databases).
They are connected and they store orders (not thier numbers as I have missinformed you).
Orders have unload date - which is the date I want to filter by.
Second database has items that have one or multiple orders, but they do not have unload dates.
I would like to create a search to find in second database all items (and get their score) that have at least one order - where orders I am interested in were created in 1 week range.
The problem - I would need to search for all items that have any item from a weekly order list. And all I can search now is either one item, or I use a prostethic data as created date is not unload date, which I am looking for.
I hope I succeeded in explaining this.

I heard it can be done used advanced filtering, but I do know how to filter for any items from another search. @adamhholmes can you maybe help me here if you have a second? I have seen you just responded to a very similar issue and your advice is always top notch :slight_smile:
@tylerboodman if I hope I managed to clarify this task :slight_smile:
Guys you are the best!

Maybe a Search for (your 2nd datatype) with the constraint Order is in Do a search for Order (then put all your date/time constraints in this nested search?)’

This would work if Order was a single Order field on the 2nd datatype

Or is the Order field on the 2nd datatype a list? If so you’ll need advanced filter

Well here is the problem, as I have tried this.
As a search for IDs or a search for orders themselves.
They are stored as a list of orders but nevertheless I cannot look up those items.
Bez tytułu2

PS: Maybe I will add that element from the database I am searching can have the order nr I am looking for, or many order nrs I am looking for - and I want to grab all of those items - as long as they have any order nr that was done within a week (constrain on orders).

“Order_id” field is the type Order, or is it text? Also looks like it is a list field? I didn’t think of that.

If your 2nd datatype “Order_id” field is a List of Orders (Order datatype)
Search for (your 2nd datatype):filtered, then do Advanced: This Order's Order_id intersects with Do a search for Order (then put all your date/time constraints in this nested search):count > 0

Hopefully your database isn’t huge because this is a client-side search, you may see a small hiccup while it uses the Advanced filter…

It’s because it’s comparing lists to lists and checking if it has at least 1…

If your database is huge you may want to consider restructuring.

Also I love the profile pic :dog:

1 Like

Many thanks Tyler. I will try this out as this can solve great number of problems I have.
I do need this to be fast as I am using this one for reporting.

And the dog I have in my miniature is my French Bulldog - Beza (Polish word for Meringue). :slight_smile: Thanks! She appreciates!

1 Like