I am designing a web page that will obtain data from my firestore collection and display each document with its corresponding fields Here is the code: here is the JS: Answer I don’t see why you’re using a for loop in your function. Unless one “Book” document is an Array of items each having the Title/Author/Points fields. You’re basically looping
Tag: google-cloud-firestore
Firestore FieldValue.increment()
I’m trying to use firebase.firestore.FieldValue.increment(), but FieldValue.increment() method is not available. I have attached an image contain available methods for firestore. This is my import: Please assist, maybe I am missing something here. Firestore Documentation Image of firebase.firestore.methods() EDIT 2: Below is the Firebase config import I did tried Doug’s export and it worked, but I’m wondering why after calling
Why does javascript reads var as a string if i add ‘+’ to it?
I have field names in my firestore document as videolink1-“some video link” videolink2-“some video link” videolink3-“some video link” I am using a for loop to get all videolinks present in the document. But this for loop is creating var values which are being read as string and firestore is returning me NaN as I dont have these fields : How
React Firebase app auth service does not work in production
I have set up a React authorization through the Google account on my web app, that does not really work in production, however, works on the localhost. Here is the message from the dev mode (that perhaps may impact): The issue is that the google sign-in modal instantly disappears from the screen! What may be an error and the solution
Send confirmation e-mail to client on saving data to firestore
I am trying to make a website for taking online bookings. The site has been hosted in firebase and I am using firestore to collect the details of booking. I am using the code given below to collect the details in firestore. Now the problem is, I would like to send email to my client and get a email at
How to add data to a nested object in Firestore
This is my current Firestore in Firebase. I need help adding data to the savedSearches map. I need to use .set() (because a users savedSearches might not exist). My current attempt looks like this: But this doesn’t add an object within savedSearches with a unique ID. When I was using Firebase Realtime Database I was just doing this: And that
Firestore != query error: Argument of type ‘”!=”‘ is not assignable to parameter of type ‘WhereFilterOp’.ts(2345)
I have an issue with my typescript compiler that i get error for this query : error : Argument of type ‘”!=”‘ is not assignable to parameter of type ‘WhereFilterOp’.ts(2345). any solution ? Answer Update your Firebase/Firestore libraries to the latest version. Not-equals queries were not available until very recently. According to the @google-cloud/firestore release notes, you need to be
Before/After properties without change are not equal in firestore-triggered Cloud Function
I have a firestore collection called events that contains documents with the fields begin, end and title. The function is triggered if a document was changed. begin and end are of type timestamp. I want my function to return false if begin or end was changed. In my cloud function, I check if the respective before and after data is
How to get last Firestore ID document
i need help with Firestore. I have a database with a collection of Clients that have some documents named by ID (1, 2, 3..) I want a function that count the number of documents of the collection and create a new document with the value+1 (eg: the last document was 6 and i want a new document 7). This is
get data from all documents in an collection firebase firestore
i need to get the data of all the documents of a collection in the firestore. but in my forEach I am getting only the first document and I have two. he prints the console twice but in my setPoints state he puts only the first what I am doing wrong?? Answer I don’t immediately see what’s going wrong in