I'm sure this is a simple question, but I only get into X++ every once in awhile. I want to write a simple method to calculate the check digit on a bar code while the user is entering it. I would like to have the method perform the calculation after each keystroke in the specific field. So while the user is entering the bar code in the InventItemBarcode.ItemBarCode field, the system will calculate the appropriate check digit and show a message in a custom field on the InventItemBarcode form.
So here is what I don't know. How do I get the value out of the form field. I've been experimenting with overwriting the "textChange" and/or "modified" methods on the InventItemBarcode/Designs/DesignList/InventItemBarcode_itemBarCode.
But I don't know how to capture the data that is entered into the field. I can get the method to run every time the field is clicked/changed, but I don't know the code to access the data entered. "myVariable = this.text()" doesn't work. Any thoughts on how I can get a variable to pick up the field value of a field on a form after each keystroke? Detailed code would be super helpful. I've spent a fair bit of time Googling how to pull the data in a form field to a variable. I'm sure it is simple, but I haven't found it yet. Any ideas would be appreciated. Thanks!