I’m having a little problem with an app of mine here, and I need your help please.
I have this block where I store data in firebase. And for each user is generated a specific database.
And below I have my database with some names.
But what’s the matter?
It is as follows: I created a logic, not to reflect the same name (tag). And this is working, but a bug. Every time I enter the app, and put the same name it already has in the database, it stores the new data over what it already has. But when I put the same name a second time, the app works, it won’t let me store the same name.
What can this be? Bug or block adjustments?
Your problem and your way of asking is always very strange and it takes me a lot time to understand time, Lol. i am trying to understand …
When I enter the app, and type the same resident name (tag) it replaces what already has in the database. But when I enter the same resident name again (tag) he accuses that the same name already exists.
The problem is this: because when I type the same name that already exists in firebase, it replaces, and the second time he accuses that name already exists?
I have in firebase these tags:
In a new registration, when entering these same tags, the value is replaced, but when I enter the second time the same tag the app, will work correctly, saying that the name already exists.
then the app doesn’t load the data of the firebase when it opens.
No. I will try to explain in parts: ok?
- The app is designed to include data, and the app won’t let me record repeated names. So far so good!
- But what happens is: when I enter the app, and I will store name that already exists in the database (firebase) it is storing (replacing) on top of what already exists there. What is not to do.
- When I will save the same name again, a notification appears saying that the name already exists.
- But the app was supposed to do this the first time I try to save data.
I already understood it.
It seems to be, that if you save a data onto firebase, it overrides an existing data. You said, that this is not allowed to happen. This works, when data is stored first time and tries to save second time while app is still running. but if you close the app and restart the app, you can store a data that already exist.
so it seems to be, that the app doesn’t get the info, that the data to store already exists or that the app has to check before.
Maybe there is a block “check, if data exists already” but this block is not addressed at the expected moment.
See how the blocks are!
Where it is marked in red was not to allow existing data.
in simple, try using without upper case down case blocks,
It didn’t work out either!
what about this?
maybe you can delete the block “downcase” because you are storing the value in upcase. I hope you figure out soon.
otherwise you have to check if TinyDB stored value is “not empty” instead of checking in list. because you delete the list after storage in TinyDB.
The database is not in Firebase and not in TinyDB.
I’ve done the tests without the uppercase letter block. But the same problem remains.
yes do it with firebaseDB.
Thank you for your attention and help.
I tried your suggestion but it didn’t work either.
Can someone give me a force?
As I read the blocks, the list “globalListaTags” is deleted after they have been saved in Firebase_DB1.
That means next time the new entry of the user should NOT be in the list, since it is empty again.
Do you know what I mean: First time you add an item, it is not in list. so the block ELSE is going on.
In the ELSE block you delete all data from this list. so next time the item is not in list again and the ELSE block is going on.
I will do new tests here!
Can you show the updated blocks