So I have been working on a barcode app for a while now, I managed to get it to work with an API that I created with Firebase realtime database.
To get the data from my API, everything works great, I even made an update record and create record in my data ressource, tested it, everything works. From there I can create new products and update all the fields but if I leave one blank it will stay blank in my database…
I have built an app to scan a barcode and check if that barcode is in my database, if it is it brings me to my update page and if it isn’t it brings me to a create new page. Up to now it all works but on my update page I cannot seem to get thelogic right so that I can change some fields and update them in my database…
What I want my app to do is this:
-Main page
-scan barcode
-if barcode exists, open “update page”
-on update page all the fields display the data fetched from the API
-I can then make changes to one or more fields
-after changes made I click a button that saves data in API
-if barcode does not exists, open “create new” page
-barcode is created in database and I can fill in all the fields for my API
-click on button to save the new barcode and all its children nodes from the fields I filled in.
I know to some this might seem really easy, but I am a newbie, I have watched a bunch of videos and read a lot but I can’t seem to find what I need to make this work.
If anyone can help me out that would be greatly appreciated, btw I love this community and you guys/girls are amazing!!