I have written some calculations on the Changed event of the text box. I want this event should fire only when there is any change on the text box by user.
During the sceen initialization the text box change event fires and calculations are executed automatically.
I donot want to do the calculations during the screen initialization phase. I want this only happened when there is any changes entered by the user.
Can you please suggest the best way to handle this?
If you have an EpiDataView involved, you could just check if that is null and only do the calculations if it’s not null. (assuming this to be a AfterFieldChange event)
If you are using an EpiTextBox you can use the event wizard for EpiTextBox with the control ValueChanged or TextChanged and perform your calculations there.
You could also consider using a BPM to do the calculations, using a condition of the value of the textbox field changing from any to another. I’ve been advised to automate this way (server side), when possible, rather than in App Studio (client side). But either way can work.
Some good input here from all. You might get away with using Row Rules as well if it needs to be a client side customization. I suppose that would depend on if you are looking for specific values or not.
Ideally, you want to do as much customization server-side as you can.
I would get away from textbox driven events Epicor is a data driven application and you should try to move to binding / data related events using the EpiDataViews and Adapters
IE: After column in table x changes
After Adapter method y called etc
Unless your textboxes are unbound this is a much better approach and it avoids the issue you are running into.