Kinetic Event DataView Help

Hello,
Being new to Kinetic, I’ve been trying to eat the elephant slowly as I’m migrating our classic screen customizations to Kinetic. I’ve completed the easy field only changes, I’m now moving to the more simple code customizations. The task at hand is replicating a character length check on the Customer Address lines. UPS api will only accept up to 35 characters so I check and limit the length on the customer screen.

Easy enough, I’ve created an event on the On Blur on txtAddress1. I have written a simple function that I call passing the string data from Address1. The function returns a truncated string or an empty string. Empty means the string length is ok. In the event, I follow with a condition that displays a message if the returned string is not empty (data entered was too long) and then does a row update with the truncated string.

My problem is the data to send to the function. I need the new data from the field update, not the Customer.Address1 database data. In the classic world, I would grab a DataView with the unsaved data. For the life of me, I cannot figure out how to do the same with Kinetic. I have read several threads talking about the Kinetic DataView, but I can’t seem to connect the dots. Am I missing something obvious?

Tim

This sounds like a good case for moving your logic away from the client UI to the server side. Use a BPM instead, that way you’re covering all bases including client UI, DMT, REST.

Thanks Mark. Your point is valid, but I chose to do it at the client because I could give the user an immediate response vs waiting for a save to trigger a BPM.

No matter which way I go here, I’d still like to understand how to grab the current unsaved DataView data.

Check out the post Hannah responded to:

You can send the entire dataview to an Epicor Function, then parse it - if you only wanted a single row, then you could row-copy to a new view and pass that.

I would look to use the columnChanging event and not the onBlur, then you will be able to access %value% as well as perform an event-cancel if you hit any issues which will revert any changes made if required.

Thanks @markdamen and @NeilTaylor. I will take a look at both of your suggestions and do some experimenting.

I have a lot to learn!

We all do!

Maybe lean on the framework for some of that work? I have to stop thinking about always using code. I’m with Mark though, I would want to do this at the server to protect the table from DMT runs or a REST integration with a CRM. But I am sympathetic to the immediate feedback idea. Maybe use properties in all the places?

Eureka! I love the simple solution @Mark_Wonsil and apricate the challenge to think out side of the box. Can’t see the tree from the forest as they say!

I will still experiment with the others suggestions to gain more perspective of things, but I’m now looking through a different lens.

I’m thinking of starting a 12-Step program for code-dependents.

:wink:

1 Like

Well, a great idea currently does not work. I’ve verified with support that Kinetic is not respecting the Max Length and Epicor has opened a Problem case for it. PRB0277312.

Until Epicor fixes the framework, I’ve found using the columnChanged works. Pretty clean, one event can monitor all four fields.

image

But only in the UI! So make sure to cover all the bases like UI bugs, other UI entry points (one-time addresses, …), integrations, etc. with some server side protection!

Understood and thanks!