Hi all… I have been looking at this all day now… need heeeeelp
Not sure where I do things wrong, but here it goes…
In my app I have an App Variable as a list of objects with id, Counter, Language
In my Firestore DB I want to store these values under each user. In my user collection there is a document for each user. Where I currently have a field called EroLangArray.
I am not totally sure this is the right way to store a list of objects in Firestore?!? But using the ‘map’ type in a new field, I managed to be able to create the field Counter, LangID and Language (Counter and LangID are numbers and Language is Text - same in the previous mentioned app variable)
I have a Data Resource called “Users”, that connects to the Users Collection in Firestore. This works just fine, and I can get all the user data.
Some hours ago, I had an API configuration for the data schema, where I had “EroLangArray” as a list of objects. Counter, LangId and Language was set with their respective data formats. This worked fine for getting data. I could use to repeat a List item, and I could access the data just fine.
When I wanted to update the records with new values, I simply just cant write the new data back. Every time I get an error: "ReferenceError : Can’t find variable: Buffer"
(I use the Update Record" Flow function to do this.)
For fun / testing / debugging, I tried to create a new record instead, using the Create Record Flow function. Same result… "ReferenceError : Can’t find variable: Buffer"
If I remove the configuration of the EroLangArray, and try to update records and create new records, everything works fine. So it is fair to assume, that the issue is with my array of objects?
When there is a reference to EroLangArray in the Schema, no updates or creates work. (I can still read data - and use it for repeats and use data on labels etc…)
Even if I create a new record with just a Name and no data in the EroLangArray, it still fails…
I tried to connect to the data via the REST API… Just to see the auto generated schema. And it looks like this:
So I have manually recreated this schema now, in my “Users” Firestore connection.
It is a bit long… Here is a part of it:
And currently my Update / Create Record looks like this for the EroLangArray
Custom list looks like this:
Am I storing lists of objects correctly in Firestore? There aren’t the many options…
Should the update / create functions work just fine with my first basic schema?
Is it really necessary to create this crazy long and complicated scheme?
What is the easiest way to write a list of objects to the database?
Any other input, suggestions and naturally solutions will be much appreciated!
Thanks for take the time - Michael