I am using a kinetic-function in a data table event. I am successfully triggering on a Column Change. I add the kinetic-function widget followed by a row-update. I tested the function in Postman and when I pass it the same data that I am sending in the application, I get the expected value returned from the function. I can’t for the life of me figure out where that goes so that I can use it to set the value of a column in the row-update. I’ve tried {actionResult.output} and {actionResult.EstScrap}. The response parameter name is EstScrap. I’ve stuck them both in the JSON editor as well as the Expression box. Worse yet, I don’t see anything happening when I try to launch the developer mode on the browser and review the network activity to try to find my payload. Any other ideas how I can troubleshoot? Or maybe an obvious step I’m missing?
Can see anything in debugger if you look at your views, specifically actionResult? May help pin down the column name. If the Parameter name is EstScrap, than I would assume that should be correct.
I think I saw somewhere that you have to declare the Parameter Name in the response parameters. Can you post up snips of your function setup?
I go to F12, I click Ctrl + Alt + V and I’m expecting something to happen but nothing happens. How do I look at my views in Chrome?
You have to enable the debugging. Click back into your form (and not the F12 window) and do a ctl+alt+8.
Then, in the console, you can do a epDebug.views
ctl+alt-V works too, but you have to click in the form first.
Thank you, Mark. I have been going about it all wrong! So based on this new “proper” technique, I can see that the function is not executing… something must be wrong on the input side. Is that what you guys would deduce also? It also looks like the response I need to grab is returnObj. Is that maybe a thing?
To check if the function ran, I find the network tab better to look at. It will call out the error.
I still get no details on the Network tab. I see the activity and details while I am navigating around but this particular event does not show up. The only thing I see is in the console it logs the event actions and I pasted that above. I have tried hard coding the method parameter values into the function (as opposed to using the data from the form). I have tried with and without double quotes. It seems like the function just isn’t getting submitted properly.
I would test to make sure the event is being called by opening a slide out. If you’re not seeing the function in the network tab, it’s not even getting called. If there’s a problem with the function itself, you’ll at least see the function in the network tab.
This is the point at which I would attach your function call to a button click so that you can control when it fires and rule out any issues with the function call setup.
Nope. If you have an out parameter defined in your function then it will come back as actionResult.OutParamName
.
Well, I’ll be. I can run that function all day when it’s hooked to a button click. But hook it to a column changed or column changing trigger and it won’t run. Guess I’ll have to try something else. Thanks for all your help. It feels good to know I’m not crazy.
If those aren’t working, you could create a dummy event on Column Changed and then create a new event that runs after the dummy event to call your function. Could just be a timing issue.
Thank you for that idea as well. I did exactly what you suggested and it ended up working even better… because I have several column changing events I wanted to trigger the same function with. By creating a separate event and calling it with the event-next widget, I was able to only setup the function once and each other event was super easy. Not sure how anyone would ever keep track of all the events and how they work together in the long run… but that’s a problem for future me.