Kinetic Event, accessing GetById erp-rest response...do I really need to use a view mapping in this simple case?

This should be easy, but honestly the documentation for all these event action parameters is really lousy

I’m using rest-erp action to call Customer.GetById
I see from the debug/trace network tab, a proper response payload
I want to grab a field from the response to pass along to the next action

I’ve tried variations on “{response.Customer.Checkbox01}” (since that’s what the response payload looks like) in my next action which happens to be a condition,
my setup of rest-erp action is simple:

image

image

image

I don’t believe in this case I should need to setup the “ERP Rest Arguments”
as I am not mapping anything to a dataview

This is my condition expression (one of several variations I’ve tried

image

any insights ?

This is the error I am getting and the response payload showing the getByID call is working

image

I have tried several variation on the syntax for my condition’s expression, which is where I get an error (the error varies depending on the syntax I use)

returnObj.Customer.Checkbox01
{returnObj.Customer.Checkbox01}
"“returnObj.Customer.Checbox01}”

what seems to get me closest is:
{returnObj.Customer.Checkbox01}
in which case I get: syntax error: unexpected token ‘.’

this implies to me it likes the {}'s and understands what returnObj is ???

I really don’t like the idea of having to use a view mapping for this, there is no reason for that in my opinion and it makes cases like this overly complex.

again, no examples, no documentation on how this is supposed to work

I was able to get this to work by using using rest-erp → “Rest Services” → “ERP Rest Arguments” → “Response Parameters” for my rest call as follows:

You should also be able to use {actionResult.CheckBox01}

Seriously ?, I did manage to try {actionResult.Customer.Checkbox01} and {actionResult.responseObj.Customer.Checkbox01} based on research but, argh…Thanks!

Too may things in there.
It will only ever be {View.Column}.

You may still need to tell it returnObj and Customer for the “Parse from Response Path” and “Parameter Name” respectively, but you don’t need the view.

I did try {Customer.Checkbox01} though and that did not work (that was my first attempt)
but now I see it’s different for a UD field, so I did the mapping thing

(my next post)

This will only work if you specified a view in the response and that view is named “Customer”.
If you don’t specify a view from a REST call, it’ll just be actionResult for the view.

It’s not. :slight_smile: