Log in or sign up to continue

create a calculated property and it looks like any other one

Property MyId As %Integer [ Calculated, SqlComputeCode = { set {*}={%%ID}}, SqlComputed ];

This is the right answer. It would be nice if there was a more built-in way to include row IDs in %JSONExport without having to do this though.

I agree with you, a Parameter for example

Hi, @Timothy Leavitt .#

What's about a prodlog ?  devil

"JSONid public" would be nice pairing with "rowid privat" ?  wink
 

While I do agree, what's the use case?

If you're requesting objects en masse it's usually via sql and it's easy to provide id there.

In a case of a singular object you usually request it by ID so it's known beforehand.

I followed https://openexchange.intersystems.com/package/iris-rest-api-template to construct some API and the GetAll used JSONExport, but when you work with JavaScript projections to the objects is nice convert the JSON to object. With no ID return you need write an additional instruction to set the ID. After the insert operation, in the master detail forms, get the ID after persist the master, help us to build conditional detail forms.