List in Memory from an API

Hi!

I’m using Xano as my backend and I’d like to know if theres is a way to load a list from the API, store this list in memory, and after some changes are made (add, edit and delete), I submit the list back to the database.

Thanks

1 Like

Hi @larri.junior!

Can you tell us a bit more about your use case? Do you want to let users makes multiple changes and only push the list when they’re ready?

You wouldn’t want to update the list in the database in real-time after every change, correct?

1 Like

Hi, @Joyce !

Yes, that’s correct! I want users make multiple changes before pushing the list to the database.

Thank you

1 Like

Ok cool.

Yes, you could create a Variable in the “Data” menu:

Depending on the data type you want to send back to your API, you can choose to create an Object or Array variable for example:
variable types

You could have workflows that update this variable (in this example, we let users save a list of favorite jobs) and a workflow on a button that users clicks on to send the updated list when they’re ready.

Does that help?

1 Like

Thank you, @Joyce, for your help! Actually I was thinking about using array of object, but I got stuck in updating a specific object inside the array. I didn’t figure out how to do it…

Thanks again