skearton Posted June 5, 2013 Posted June 5, 2013 Hi, I'm trying to get an on object modify script trigger to run on a global field that receives input from a barcode scanner. Is there a reason why the script doesn't fire? I've also tried using on object exit trigger, and placed within my script the step to go to another field or object to try to get it to fire but that doesn't work either. I have to physically click outside of the input field for it to fire the script. The scanner was placing a paragraph return at the end of the code and I removed that, but it didn't make any difference. I'm brand new to bar code scanning as well so if there is something obvious I'm missing here let me know. This is the current state of the script: Perform Script [ “Allow User Abort” ]# # # first we filter for alpha characters to let us know which form to go toSet Variable [ $Form; Value:Filter ( z_RESOURCES::g_ScanSet ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) ] # then we filter for numbers to let us know which record ID to go to Set Variable [ $RecordID; Value:Filter ( z_RESOURCES::g_ScanSet ; "1234567890" ) ] Commit Records/Requests [ Skip data entry validation; No dialog; Force Commit ] Go to Field [ PROJECT::c_PriceExpiresID ]#If [ $Form = "WRK" ] Go to Layout [ “WorkOrder_Detail” (WorkOrder) ]Enter Find Mode [ ]Set Field [ WorkOrder::__kp_WorkOrderID; $RecordID ] Perform Find [ ]# Else If [ $Form = "INS" ]Go to Layout [ “Install or Service Call Detail” (Install) ] Enter Find Mode [ ]Set Field [ Install::__kp_InstallID; $RecordID ] Perform Find [ ]# Else If [ $Form = "PO" ]Go to Layout [ “PO_Detail” (PO) ] Enter Find Mode [ ]Set Field [ PO::__kp_poID; $RecordID ] Perform Find [ ]# End If Thanks for the help!
Lee Smith Posted June 5, 2013 Posted June 5, 2013 You have Advance, so run your script using the Data Viewer and Script Debugger.
skearton Posted June 5, 2013 Author Posted June 5, 2013 I have done that, but I still can't get it to work.
skearton Posted June 5, 2013 Author Posted June 5, 2013 OK I figured it out. What I did was program the scanner to add a carriage return as a suffix to the barcode and this in turn causes the script to fire. I also made sure the field behaviour was set to go to next object on a return.
skearton Posted June 6, 2013 Author Posted June 6, 2013 Well it is working now in its simple form, but of course I need to make it more sophisticated. I'm trying to figure out some keyboard combo to take the user to the global field to receive the data to be inputted. What I'm trying to do now is enable a batch scan process, instead of doing just one at a time. I read somewhere else of someone using Shift-CapsLock on a keyboard to launch a trigger to go to the global field, I just can't get my head around the differences of the Get functions; TriggerModifierKeys, TriggerKeystroke and ActiveModifierKeys. I just want the user to be able to click a keystroke(s) on the keyboard and then start scanning the items in and when they are done that, they then click on the keyboard enter button and the work is done for them. Does anyone have an example of script like this? I would like to set this up for the shipping / receiving department, so that when shipments come in they can scan the PO or multiple PO's and have the script locate each PO in the database and auto enter the date received field with the current date and who received it.
Recommended Posts
This topic is 4188 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now