Load a dataview from a function call

I am trying to learn about function calls and views so this is not a real world example. I am trying to load a dataview from an erp-function widget. Any ideas?

function_2

debug_1

I looked more into kinetic help. I made some changes but it’s still not working. I added a Table name in c#.

function_3

widget_3

After looking at this thread from @fvodden I looked at my network tab to see the actual data returned. Below is my updated “Response Parameters” based upon the data returned. However my view is not showing the new data.

debug_2

My View Name did not match the Ep Binding name in my “Grid Model”. It now works.

1 Like

This is so cool, thanks for sharing your learning process. I can’t wait to start playing with this stuff in Kinetic.

1 Like

I’m trying to replicate what you did in another function, and I’m getting this error:

My function does exactly what your function does:
image

My DataView:

Response:

I don’t know what I’m getting wrong with this function call.

This is my set up below. I name my Data Table and Data View ID the same and do not give a Dataset ID. Not sure if this the “correct” way or not but it works so far.

Also if you are familiar with a program like Postman it may help when debugging.

1 Like

In the context of what’s being discussed, only the view name is needed.

I agree with James, though. You need to make a call to your function in Swagger or Postman to find the names of the parameter name and response path.

Invaluable :mailbox_with_mail:

Happy Old Man GIF by Love in Kilnerry

I’ve given up at this point.

I went through every step and gone through every thread, still the dataview is not being filled with returned data.

I’m able to see the results being returned in the Network tab but for some unknown reason the DataView is not being filled.

Will you please post a screenshot of the results in the network tab?

Not sure if it matters but I use the “rest-erp” widget not “erp-function”. @hmwillett does this make a difference?

Not really. The function widget just gives you some properties that will pre-fill with function data like library names and whatnot. They behave the same in the end.

I can’t take a screenshot of the Network tab right now, but I have a screenshot of a Postman response showing the correct data.

image

Yeah, I did change that and tried but still nothing.

I’m on version 2022.2.5 btw, I don’t know if that makes a difference.

Should I add columns to the DataView? Should I attach it to a Grid?

Is your library named properly in your function call? It’s concerning that this is undefined.
And is your library promoted?

Nevermind–this is fine. Mine does the same.

You can “ctrl + alt + v” while your debug console is open then scroll up expand System Dataviews → actionResult and may see more info about the problem. :man_shrugging:

I created an example to mirror yours.
Set it up similarly and it should work for you:

I did the exact steps.

There is some weird warning message which appears after the response.

The DataView is not being fulfilled.

image