Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

On object modify not working?

Featured Replies

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:

 

  1.  

    1. Perform Script [ “Allow User Abort” ]
      #
      #
      # first we filter for alpha characters to let us know which form to go to

      Set 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!

 

You have Advance, so run your script using the Data Viewer and Script Debugger.

  • Author

I have done that, but I still can't get it to work.

  • Author

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.

What are you seeing?

  • Author

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.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.