How to set/modify a Thing's fields on client-side (without hitting database)

Does anyone know of any workaround/hack to set/modify the fields of a thing without hitting the database?

Lets say i have a type called Match with fields name (text) and games (number).
Then i create a custom state, mymatch, whose type is Match.
I want to somehow set and modify the fields (name and games) of my custom state, mymatch on client-side without hitting the database.
If I use Modify a Thing action it will hit the database. I don’t want that.

I’m ok with any kind of hacky workarounds even if it involves some coding so feel free to suggest any crazy workarounds.

Please note it’s important that i don’t hit the bubble server/database, any ideas should be done purely on client-side/in-browser.

Thanks

1 Like

You just use element > set state again. This can also modify the existing thing. E.g.,

Set state… which state? Element’s MyThing. Which fields?

Name = New Name (Or Name = Element’s MyThing’s Name:some_operator for example)

Games = Element’s MyThing’s games + 1

Other fields = as appropriate

… hope I’m making sense!