I have built an app which I now have finished, so now I thought I would “re-build” it, just for learning practice, and this time I want to use Firebase instead of Airtable which I had for the previous version.
And with Airtable I learned that if I wanted to get a specific value from a specific row in Airtable, I could use “_id”.
But how can I do with Firebase?
I am trying to add a delete function from my dataViewerList by swipe to Left.
I followed a tutorial that said I could simply add “null” as the value in my Saving-block for the RealTimeDataBase. But when I do so it will remove ALL my items. Does anyone have any tips to me how I can do this?
So in the tutorial only one (the desired) item gets deleted.
In my app the whole list gets deleted.
But I can’t figure out what’s the different…And I can’t see how my Realtime data base would know what item this row ID in me DVL is…
How would you have done? Any tips?
(“SyncWithDB” is a function I made that ensures that everything in my Firebase list is synced and viewed in my DataViewerList as well).
DVL requires a table (google sheet, Airtable, Local Storage) and cannot connect to FB. Can you explain how you did the connection so I can suggest something.
The tutorial I followed said I could use this same “Save-block” for my deleting but change the value to “NULL”. That works for him but when I do this everything under my Items-key gets deleted.I have also seen other guides that recommend this or using an empty string… none of these works for me though.
…and this deletes ALL my items. And I am not surprised over that. It really feels like I need to point/connect this row id item to what item it is in the FB list??
If Text_Input1 is empty then all the sub-keys under Items for the specifies user will be deleted. If, in the other hand, Text_Input1 has a value then only that sub-key (mentioned in Text_Input1 will be effected.
I have another idea, but first, theoretically, when you ad an item to your DVL there will be a “row id” output in that block:
Will that be the same as the one provided when swipe a row in DVL?
I mean, Are these connected to each other?
-when create an item, that Item will get row id: xxxx
-when delete THAT item showed in a row in DVL, it will then have this row id (xxxx)??
Is that how it works?
My idea was to, every time I create an item I store that row id in a variable and then call that variable as the value in the delete-swipe function somehow…??
Just wanted to share, this worked for me.
I simply add the text for that item in DVL to a variable and then put that value in the textfield. Then clear that textfield after saving is done.
@andreas.sjdtomypv I’m currently trying to do the same thing as you, e.g. rebuild my app replacing Airtable with Firebase… Would you be open to sharing your sync function as I have the same problem.
Cheers thanks!
Yep hooking into FB was ok, initially wanted to Firestore as it seemed more efficient but got stuck with using the API solution. So gave up and just went with the standard Realtime DB.
By the way I’m using custom DLV…
Thanks for sharing!
Ok so hos has it gone for you now then? Did you got it working as you wished after all?
I am using DVL as well.
Btw, please share if you find any solution in getting the either stored to FB or viewed from FB in DVL in “insert as last”-order (instead of alphabetic as is from FB). That’s where I am stuck at the moment
nah haven’t implemented it as yet, still messing around with structures and views etc. But I’ll keep you posted…
A possible logical solution (Although I’m finding logic and actual is sometimes very different in this platform) For the insert as last order, would be to create either a numeric field from 1 to X and filter using a list numerically or using a timestamp??
Hopefully that helps but no doubt my theory is probably completely flawed
Insert at last is a property of Lists and to port this to FB simply store your data in a list and save the list in the FB key. You will then retrieve it as saved with your preferred order.
Hi.
I have tried different kinds of list-solutions but I don’t get how this can be done…
Ive tried this for example where I hoped I could set the order in a list and then pas those items in that order to FB, but that didn’t solve anything for me,
I don’t get how I can use this in FB. If I want to do anything with one of the items in FB later on, like delete or edit, I would need to separate these first and then manage these separately somehow.
Was this how you ment?
The order is fine though, so I guess I would just need to separate them on the “Open Screen”-block first, but was this how you ment?
Thanks, ok so i should create a new label then, called ex ”orderedList, and attach my myItemsList to that? And then also have my myItmsList variable as the value?