The origin
I’m making a few changes to the Data Collection app in Kinetic to streamline the process for the operators on the floor. Specifically, I am updating the inspection entry screens that appear in both End Activity and Report Quantity to auto-click through a handful of screens, since the answers would always be the same the way we are operating.
The customization
The functionality itself is rather simple. I created a new function called KX_AutoGenerateonValuein that checks a condition: was a ValueIn passed to the app context. If the condition is true, run the OnClick events for the next two buttons. The hook for this was originally placed after the AfterInitialization event, but was moved to override the GenerateTestSetTool event.
This works 100% of the time on my computer, as well as the devices of the other members of our IS team. However, when demoing it to anyone else in our plant or in conference rooms logged into our profiles, the functionality fails to activate. Oddly enough, the functionality works when the console is opened, then returns to breaking after it is closed.
Fix attempts
- While the event was tied to the “after event” hook, the condition was updated to display a message if the ValueIn condition returned false. This never triggered.
- Cache and personalizations were cleared on computers where the customization failed to load.
- The event was moved to override an onclick event instead, removing the reliance on a function that ran without a direct user action.
- Console messages were reviewed, but with the function working while being monitored, nothing helpful was found.
- At one point, we determined it possible that the app-open node’s menu item was using the original menu option instead of the custom menu option with the layer, so a new menu ID was created.
- The security code linked to the menu option is set to allow all users, so it does not seem to be a security problem.
Conclusion
The problem is almost certainly to do with the layer not rendering properly, as overrides to events that are for sure triggering are not being applied. What can cause an app to open with the correct layer in some conditions, and not others?