I have a window I’ve made in application studio. In order to make it update the information in each row as the numbers are entered I have an event that triggers on column change(So when a user presses tab) that triggers the other events.
It works as intended until the third event, “CalculateTime”.
If I get rid of the dialog-show, it does not work. The Calculations don’t actually go through and get put in the next field. The dialog show can be anywhere before the calculation and it will complete without an issue, but if the dialog is not in there, it does not complete the calculation.
It has to actually have a type/message in the dialogue, if it does not pop up, it won’t work. I’m wondering if its a synchronous issue? and the dialogue box is giving it enough time to catch up.
I feel your pain … the event editor is not ready for primetime.
From what I understand, it’s getting better, but it works best (most-reliably) when you’re only connecting a new widget to the end of your flow … as opposed to connecting existing widgets together in the middle of the flow
This won’t help you now, but lately I’ve been using console-write — instead of dialog-show — to add my debug messages (although that does not stop the event flow…) and then I leave the widget, but clear the message when it’s time to deploy.
Update: I think the issue is the last calculation is relying on a number from the second, if I change it to 1+1 on the final calculation, it works and updates the field fine, or 1+ a different field, it works, but when the previous events calculation output field is involved, it doesn’t. I tried changing the line after the second calculation to on-success but that did not work.
First is on the left, the problem one is on the right.
The condition on the final event is always true in the case I’m testing.
So basically its trying to subtract 2 numbers in the second event, and output the third into a new field. Then the next is trying to divide that resulting number.
I don’t know if it matters but these fields are all additional columns I added to a dataview. I tried them with UD fields that are EP bound, but the same issues happened.
It shouldn’t. I use the TransView dataview for my tests and it works fine.
What are all the data-commits doing? Why so many?
You might want to try doing all of your calculations in runtime variables (TransView) and then committing only once at the end.
The data-commits were not always there, they were part of trying to get this to work. Let me look into TransView, as I have no idea what it is or how to start, and give it a shot, I am very new to all of this.
TransView is just a runtime view. You can store session variables in it without having to commit anything to a database. I use it a lot for calculations, rule triggers, etc.
If it’s a native Epicor screen, it will have a TransView defined. You don’t need to add columns as they can be created on the fly. If you do a row-update for TransView.CheeseCurds and the column doesn’t exist, it will add it at runtime and hold your data until it’s replaced or you close your screen. You can actually do that with any view, but using TransView keeps it isolated so you know you’re working with a variable and not a database column.