i hope that someone give me advice about save data in new child in Realtime DB. This settings everytime override data in db and im not able to find a way how to create new child (as is a project bucket).
Could someone share image about settings to create new child everytime when i save data? I found couple of images about this kind of settings, and i propably miss datachanged block, but i really dont know how to setup
If the database contains the same type of data, then a list should be used. You add the child to the list and save it to the desired root node. To add a new child, you must obtain a list from the database, add a new child to it, and write this list in the desired root node.
According to your screen shorts, partner is the child name and you are storing some data ( like email, gdpr, ico . . . ) on it. And you don’t want to overwrite this. that means you want to create an another child ( e.g. partner2 ) to store another data ( like email, gdpr, ico . . . ) on it.
Ahoj, kukam že mi budeš rozumieť tak to dám po našom, ak som dobre pochopil tak samotný text “partner” užívateľ nezadáva, v tom prípade asi stačí vytvoriť novú premennú, ktorá sa bude zvyšovať každým novým zadaným partnerom.
Objevil jsem problém se zápisem do databáze z proměné, která se však zobrazuje a ukazuje v pořádku. Když to popíšu: z Local Storage si vyvolám ns nové stránce email (je to po přihlášení přes Sign-in), který je naprosto v pořádku - pokud ho vyvolám v labelu tak se zobrazí. Pokud mu nastavím hodnotu jako proměnou tak ji však nedokáže propsat až do databáze. Zkoušel jsem i variantu s přepsáním labelu jako proměné do databáze, ale to také nejde (zobrazí jen label). Co je však zajímavé, že pokud dám proměnou do create objects - tak se zobrazí v databázi správně.
Pokud přidám jako value proměnou + 1 tak se mi v databází zobrazí null - případně NaN.
Přikládám:
Varianta přes label
Varianta přes proměnou
Díky za případné info.
EN: I just looking for solution how to use variables in key for realtime db from local storage key. There is always data from local storage (i test it by label), but im not able to write this data as a key into database. When i use variable in realtimeDB.value its working fine, but when im use it as a key im not able to see this variable in my db.
If I understand your examples correctly, I believe that the problem is that the variable that you are setting from your 'Local_Storage1 call Get' block (for example, email) is not available in your call to the 'Realitime_DB1 call Save' block. To make it available you need to put the 'Realitime_DB1 call Save' block in the 'then do' slot of the 'Local_Storage1 call Get' block. In essence, everything that you want to do after you get the value of a 'Local_Storage1 call Get' block must be within its 'then do' slot.
hi @Mark - i allready try maybe every possible way (and logic combination ), but do you mean like this? Value is stil empty and dont write anything to realtime db.
For explanation - i would like to have possibility to save xx forms into realtime db base on email (every client login via email) andd then i will create next steps. For me is ideal tree in realtime db.
db/email_of_user/company1/name, phone…
db/email_of_user/company2/name, phone…
I tried this solution - first click on button 3 to load data from local storage, then fill imput and click button 2 to send… nothing
Another issue might be that you are using an email address as part of your key in the realtime db. A period/dot (i.e. ‘.’) is not allowed in Firebase (i.e. Realtime DB component) keys and in all likelihood your email addresses contain periods.
Just so you know, the other disallowed characters are: ‘#’, ‘$’, ‘[’ and ‘]’. We need to do a better job of documenting this limitation,
Hi @Mark , you are absolutely correct - there is no possibility to save data value with special characters. I have to use userid from Signin to get correct value for realtime db.