delete document reference

Widgets & Design
Resolved

I need to delete data from firebase if a variable == 0, example, i have collection country, their sub-collection would be cities, then hotels. Users can upload a hotel for others to reserve a spot, and when each person reserve one, it decrement by 1 of course, i have that till there, my cuestion is when it gets to 0, i want that hotel to be eliminated and not longer shown in the listview, and adding a second cuestion how do I do when the number of suitcases for example decreases, when it reaches 0, but there are still spaces for people, this does not start to be a negative number, I mean like the min number is 0

What have you tried so far?

I´ve tried addding a if/then/else when i define an action "delete document", so when my variable gets to 0 then input the "reference", but else as "null" idk if its right or not, but it does not work

Did you check FlutterFlow's Documentation for this topic?
Yes
1 reply