Delete a field in Firestore

Hi everybody, i want to delete a field of my document in firestore. But i don't know how to do this... Is there anybody who can help? Thanks in advance!

Hey @mike_mike! Is your question similar to this one?

http://community.retool.com/t/how-do-i-delete-a-field-from-a-firestore-doocument/10020

If so, let me know if you'd like me to enable the beta query type to enable you to write raw Firebase queries so you can call the deleteField() method!

Hey victoria!
Oh, yes indeed, it is the same problem for me. I would be very grateful if you could enable the beta query for me. Thank you in advance! :slightly_smiling_face:

Happy to! I usually look user orgs up by the forum emails, but I can't seem to track you down. Mind sharing your subdomain @mike_mike? Feel free to DM me if you'd like to keep it private!

Very much I would like to send you a DM, but I'm so new here I don't know how to do that.... Do I have to go to Developer Network?

You should be able to click my name and then the little envelope button! Feel free to email me at victoria@retool.com as well :slightly_smiling_face:

1 Like

I have now also added the email for my retool project to my profile, maybe it will work now. :slight_smile:

Hey @mike_mike! Thank you for reaching out—you're all set :white_check_mark: Let me know how it works for you!

Thank you for unlocking it. :slight_smile:
Unfortunately the code for deleting a field does not work. How would you delete a field of a document in Firestore from Retool? What would your code look like?

Of course :slight_smile: What does your current query look like? Are any of these examples close to what you're looking to do?

https://rajatamil.medium.com/firebase-v9-firestore-delete-document-field-using-updatedoc-13573e38e1a5

https://stackoverflow.com/questions/46984308/how-to-delete-a-field-in-a-firestore-document

https://stackoverflow.com/questions/48145962/firestore-delete-a-field-inside-an-object

Thank you. In the meantime, I have also found my error. It was because I used the code patterns for "web version 9" and "web version 8" from the Firebase documentation. But that it works, you need the code pattern for "Node.js".
Well, now it works and I want to thank you @victoria again very much for helping me! :partying_face:

Oh awesome, so glad to hear it. And thank you for posting your solution here, future blocked users appreciate it :pray: