I’m trying to update a data store record, I need to add to the current value of that record.
How can I achieve this? There seems to be no way to select the “this.recordvalue”.
If this can’t be done atm, can I request this feature please
I’m trying to update a data store record, I need to add to the current value of that record.
How can I achieve this? There seems to be no way to select the “this.recordvalue”.
If this can’t be done atm, can I request this feature please
What is the database itself?
Maria, MySQL, MongoDB, PostgreSQL, etc?
Postgres but does that relate to the data store component?
I assume the “current value of that record” is already stored in your PostgreSQL?
But you haven’t set up a query to find that record by its key or unique combinations to return its “current value” as far as I can tell.
Just to visually verify that you’re applying this update to the correct record if this is a Dashboard type of operation.
So I mean. The current value inside the data store component. I want to add to the current data store component without an additional database query
If you have a table generated from a datastore, you can add buttons on each row which increment the value of a field like this:
dmx-on:click="datastore1.upsert({$id: $id},{qty: qty+1})"
(I’m not sure if this quite answers your question.)
Hi Tom
Unfortunately that won’t work as my use case is different. The user doesn’t change a row in the table manually.
It’s a socket message that fires and should add on a specific record in the datastore.