I am trying to query a list of documents using the Data List element. I am using the firebase query to check if the id is in an array of ids.
However, the Data List element ignores this query and just loads the entire list of documents which is huge. I have even tried using the front en
Hey @Panto9, two things that probably are causing the issue.
The operator you want to use in this case is “in” and not “array-contains”. Also, be sure to provide the list as a javascript array, in the format [“text1”,“text2”,“text3”]
Since you’re using another query’s value as the filter value, you must wait until it’s ready. You can do this by hiding+collapsing the Data List element and setting a conditional to show it only when the Data Single “field1 (list)” count is > 0. (documentation reference)
Quick question. (It’s the previous guy, just moved the project to a new account😊)
I have an array of objects (map) in the database. How do I specify this type of field in the actions (for clearing this array, adding a new object to the array, or removing an object from the array)?
I will soon be implementing search feature in my app. I want some basic search where I can match the keywords to the product name. However, the query filters don’t have any of the filter type I’m looking for (unless it’s a different interpretation or method to achieve this in firebase).
Is it possible to search database based on keywords and return collections whose specified field contains any of the letters in the search keyword? Either randomly, respecting caps or in the character order of appearance in the key
Hey @digiitsagency. Firebase Firestore doens’t support this kind of queries. So filter like “text field contains x” are not possible. Usually what is done is to integrate with Algolia and create Cloud Functions that feed the collection data you want to apply these kind of query on to an Algolia Index.
Hello Augusto,
Hope you’re doing good. Your plugin has been a Godsend since I discovered it. Despite the small bugs here and there I am quiet satisfied with it and it helps me during this time where I am not really making any money from Bubble and just doing free projects, thereby keeping costs to a minimum. Thanks a lot.
Please could you put me through on how to create or update a map or a list of maps using the plugin? Here I’d like to save the user’s subscription along with other data like the date they first subscribed, the renewal amount and dates, the date they last subscribed etc…
I want to be able to save this as an object in an array (list of subscriptions) in the user’s documents.
That way I save document reads and simply load all this at once when the user accesses their account.
I’m also trying to figure out how to upload a file to storage and get the URL to be saved in a document. And also be a lento download said file either directly from the link saved in the document or some other appropriate method.
I figured out the file upload part. I was confused about all the base64 terminology. Just had to quickly read up on it to understand a little. Please correct me if there’s a better process by which I can achieve this same result.
Steps::
first get the File URL to Base64 plugin by blur apps
add the plugin element to the page and point it to the file you want to upload. Usually the file uploader elements value. Remember to setup a way to know or notify you when the file has been converted to base64. I simply had a text element showing the value (truncated of course). You could use some alert or more advanced conditionals or workflows [like making the button only clickable/visible when the FileBase64" element’s base64 value is not empty].
4.b.Note that this will only be valid for “File String Type” of “base64”.
If you choose a “File String Type” of “data_url”, then set the “File Base64 string” on the “firebase storage file upload base64” action to the “FileBase64” → “full base64 string”
set the “folder path” to something relevant like the category of files your uploading. It’s essentially the folder name for the file’s location on Firebase storage. In the images above I set mine to “newsletters”
set the trigger ID to anything, this will be used for the action listener that’ll get the uploaded file’s URL. I used “file” in the example above
add the firebase action listener and connect it to the “firebase storage file upload base64” action with the same trigger ID
9.a. Setup the action listener to save the uploaded file url to a custom state somewhere on the page. This is optional, if you want it available outside the action listener for other things.
9.b. You can now use the saved link in the custom state or use the url directly from the action listener.
And hey presto! the file was uploaded to Firestore, and you can use the link for whatever else you want either by directly setting an action inside the action listener or saving it to a custom state (still within the action listener)
I want to display the “categoryID.name” like native bubble database does when there’s a relation. I tried Datalist with schema from api conector and DataList just in text with DataExtractor but doesn’t work for me.
Can you please tell us how work with “references” to get the value of the reference please
Hey @abel.guggle! Well, right now the plugin doesn’t support this kind of query as in Bubble (it is a good feature to look forward to though, I’ll do some tests to see if it is possible with data schemas).
As of now, what you can do it to get the referente field as a text on the data schema. It will return something like “product/product_id”. You can use this value to feed a Firestore Data Single element, providing the collection and the document ID as, respectively:
Hi @augusto.salles
Okay. I got it.
As you mention, having that feature with data schema would be really really amazing, I hope you can achieve it.
I appreciate your answer
I have actually tried searching for that in the plugin page. I couldn’t find anything extensive on creating maps or list of maps. However there’s some mention of how to.
My issue is that I did exactly that. For example,
This is a map
{
“name”: “Jinn”,
“age”: 22,
}
But if I feed this into the plugin, it does not create the map, just a field of type string. Also tried various ways to do this for a list of maps, didn’t work either. Just created an array of strings. Note that I did specify as per the documentation with the right field types.
That’s why I gave up and decided to ask the question. I have long since resorted to using doc reference instead though. I will go and try again, because using maps is much more efficient (I think), than having to make multiple calls to get data that I could get in a single call.
Hey,
how to switch between environments?
I see its possible to give fill dev env data in the plugin settings, but how to switch between them in bubble?
Hey Artur, the moment you input “dev” data on the plugin settings, everything you do on version-test of Bubble will use these credentials.
The live ones will only be used on version-live. Bubble manages that for us.
Thanks for creating this plugin!
How can I get data from a subcollection of a particular document?
Specifically I want to get a subcollection on the currently logged-in user’s document. The user represents a parent, and I want to list their children, for example.