How do I turn the following custom code into something that works inside of application studio? I have a custom field on my start production activity MES screen. I scan the job traveler barcode into this field and it parses out the data into the jobnum, assembly num and opseq fields and then presses the OK button. Any help would be very appreciated!
You might have to put your split and count code into a function (unless someone can show us how to split in an App Studio event), then create an event that triggers on OnBlur of your text box, call that function, parse the response into your data row, then call event-next for the OK button event
@jwphillips in this case do you create a function by just adding the function widget and then adding the code? or do i use function maintenance? or is it the same thing?
I’m not function expert but I’m thinking you would trigger the function and send the full raw data (JobNum-AsmSeq-OprSeq) then the function splits the data and returns three data fields: JobNum, AsmSeq, OprSeq. Which you assign to the form’s dataview fields.
I hear you, I’m pretty new to them too as we’re still working on our Kinetic UI conversions from Classic. I’m starting to draft up a function we’ll need for Order Entry for outside-sales commissions we have in Classic UI.
Like @Randy said, you’ll have one request parameter - your whole string.
Then you’ll have your three parsed properties as separate output parameters (plus maybe an error message or something to indicate a failed parse) - where I work, we like to give them prefixes for clarity: “ip” for input and “op” for output
Then to set the response values in App Studio, you’ll use a row-update widget after the function call to set your row values to "{actionResult.opJobNum}", etc.