REST uBAQ: Updateable Columns

Apologies if this has been answered before. I have a uBAQ exposed that returns UD05 records. Only some of the fields are updatable.

The original record looks like this:

When I PATCH that record using the Key fields and the updatable fields (as defined on the BAQ), it overwrites the record entirely…
JSON sent on PATCH:

{
"UD05_Company":"JRF",
"UD05_Key1":"9/7/2018 3:58:52 PM",
"UD05_Key2":"update_status",
"UD05_Key3":"",
"UD05_Key4":"",
"UD05_Key5":"",
"UD05_Character02":"hi",
"UD05_ShortChar01":"success"
}

The non-update-able fields were clearly overwritten.


So, what is the point in defining which fields are updatable if it’s not enforced on the API level?
I understand I need to write the entire record out now, but I would think this would behave similarly to the interface.

The interface prevents the object from being modified if its not updatable… Agreed its a PITA…

Lame, good to know though! Thanks

I’m guessing the rowmod, rowindent, and sysRowID do not need to be filled out? They are probably local to the dynamic query data right?

image

RowMod you need to fill out if you want to modify that record. (ostensibly)

It worked without but I suppose I should just throw a U in there?

If you wanted, could use us a BAQ BPM to fill in the data you didn’t want to change rather than pulling it in and sending back in your rest application?

I think this will work the way it exists, it’s just something to be aware of

I’m just wondering about on a performance side. If you don’t have to send the data over the wire, then all of it’s done on the server. Probably not worth the hassle, I was just curious.

1 Like

Updatable columns in UBAQ were implemeted when no REST support exists. They can only be supported by client application - like by dashboard. Dashboard knows what column is marked as editable and shows editor for it. But on update it sends complete UBAQ row to server nevertherless.

For REST we cannot make same behavior happening - complete row is always needed and no UI exists to fill it for you. So updatable columns are not applicable in REST call. (but you can write your own UI where they can be used :slight_smile:

(to be more precise - you need to send all columns that are involved in the mapping for update operation, but it is usually almost all columns in the row)

2 Likes

Now that you say that, that makes sense why I’ve had problems with udashboards changing values they weren’t supposed to be able to change. Good to know now.