App Studio - erp-function action - access arbitrary JSON keys in response?

I am successfully using the erp-function to call a function from my Kinetic app, but am struggling with how to access and use the arbitrary values it returns. My function does not return a dataset but instead a pretty bog standard response object:

{
  "ResultMessage": "Success",
  "ResultError": null
}

With help from other Epiusers posts, I have successfully dumped a returned dataset into a view, but can’t seem to do the same with single keys. Preferably, the ResultMessage and ResultError keys would be saved to a single view, but that isn’t happening:
image

Since these keys are at the root of the JSON object, I’m leaving Parse from Response Path empty. View Name is the view (that I’ve created) that the value should be dumped into.

What’s the best way to utilize the results of this call?

@fvodden did you figure this out? Also you said

With help from other Epiusers posts, I have successfully dumped a returned dataset into a view

I have not been able to find a post to that helps me on this. Do you remember how you were able to display the dataset?

In this post I made, I showed how I loaded BAQ data into a view and grid. Is that helpful?

Yes. That is helpful. I’m still not there yet. I am doing something a little different. I am returning a dataset ,created in c#, from a function call. I created a new topic here. You inspired me to look at the actual data returned by looking in the network tab of the dev tools. I updated my properties but my view is not showing the new data. I am also going to update the new topic with these screen shots. Thanks.

debug_2

Are you defining columns on the grid model?

Yeah. At least I think it is correct.

widget_5

What does your view configuration look like?

Thanks @fvodden I see my problem. My Ep Binding is “SpecialItemsView” not “SpecialItems”. I updated my “Response Parameters”. Now it works.

2 Likes

Great!