How do you Do a search for all things in a list of things?

I thought this would be a simple answer, but I’ve not found a way to find all items in a list of items using just the Do a search. I know you can achieve this with a filter, but that doesn’t work in cases where privacy rules prevent a user from viewing the field in question, so does ANYONE know if Do a search can be configured so it finds IDs in a list and lets you sum values found there?

As an example, let’s say I have a set up as follows:
image

Privacy needs to be as follows to ensure users can’t see the Added list but can get it via a search; the same with the value of the selections:

image

Hey @eLPDev :wave:

Thanks for the post and great question! I might be misunderstanding… But any reason you couldn’t tag the selections with the object they belong to? As a result, you’d be able to do a search for selections where object = x and only get the results you’re looking for.

To take this a step further, keep in mind you can always build this as an endpoint in your app that only you can hit. You could have the endpoint ignore privacy rules, do the search for exactly what you need and respond with the value without having to risk exposing any of the involved fields / records.

Worth a try at least! Give it a look and don’t hesitate to reach out with any additional questions to Support@Bubble.io

Hi, @Andrew.Vernon! Thanks for the reply. The linked item approach wouldn’t work in this case…but that’s due to another part of the configuration I forgot to mention. :sweat_smile: To clarify, a bunch of Selections would have the same linked Item, but only some of them would be in the Item’s Added list, so I need some kind of private intersect in searches, which Bubble doesn’t seem to offer currently. Plus, I realized that privacy rules don’t seem to support operations like summing if the fields aren’t visible to the user, which kind of makes sense.

I think I may have to go the API route; I was hoping there was more of a front-end way, but I’ll take what I can get.

Hey @eLPDev

Ah, yea, that kills my first idea. Not a problem. In this case, I would definitely go with the backend workflow endpoint. There’s a couple steps. You’ll set up your backend workflow, set it to public, to ignore privacy rules and to only run with authentication. Then, you’ll create an API key in settings / api. And finally, you’ll set up your API connector to call this endpoint with the API key. Calling through the API connector instead of using the ‘schedule backend workflow’ action means you can immediately interact with the response of the call on the front end. So, it’s essentially the ‘private intersect’ you’re looking to accomplish.

Give it a try and feel free to reach out to us directly with any questions: Support@Bubble.io

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