I would really like to increment a table field without first GET’ing that value, as there is a change that multiple users could be calling this script at the same time.
So, I am thinking it would be great to have some mark-up in the PATCH call that indicates an increment.
Some mark-up like this may work: platform.api.patch(“db/tableName”, {“somefield”: “++2” });
It may be tricky because of the filed type should be integer and passing in a string.
Maybe it is already possible, if so, then let me know
Haven’t looked at stored procedures yet, is that an option??
Lee looked at this and has a good idea on implementing markup operations in PATCH (CAST, CONVERT, formatting, concatenation, math, etc. can be passed in as a value to a field). It may be released in 1.9 coming out next week. I’ll let you know when it ships.