Forums

OverviewFelgo 2 Support (Qt 5) › Update value of firebase object

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #20813

    Edward

    Hey!

    So I am handling nested data objects in my firebase database, I am currently reading the data by pushing into an array (calendarListModel) to work with within my app, a sample of this is;

     

    [ 
    {"date":1544443200000,"name":"Edward","status":1},
    {"date":1544529600000,"name":"Katie","status":0},
    {"date":1544616000000,"name":"Claire","status":1}
     ]

     

    I will be creating a list, populated by all entries with a status of 0 (false), which I am working on shortly

    there will be an accept/reject button for each entry, which will do either of the following;

     

    Accept Button: change status to 1 (true)

    Reject Button: Remove entry from database

     

    How could I update just the status value in firebase, or delete the entire entry? each entry is held by an id which is the time it was booked?

     

    Thanks

    Edd

     

     

    #20933

    Alex
    Felgo Team

    Hi,

    to delete entries from firebase you can simply set the value to an empty object {}. To update a value you can use the path to the value as key for the setValue function, which would be something like “id/status”

    Cheers,
    Alex

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support