Stop Rule Execution Actions Help Prevent Cross-Browser Errors

Yesterday my client presented a problem he was experiencing in Chrome that I could not reproduce in IE 11. The issue, as it turned out, had to do with how SmartForms rules are executed through different browsers.

Given a SmartForm rule that is comprised of three “blocks” of conditions and actions on a subview:

A K2 SmartForms rule, comprised of three “blocks” of conditions and actions

This rule may execute flawlessly in IE 11, but that’s not the case in Chrome or in Edge (NOTE: Microsoft Edge is not compatible with K2 blackpearl versions 4.6.11 nor 4.7. See the K2 Product Compatibility Matrix for details.)

The difference, it seems, is in how the rules are executed in different browsers — IE 11 will execute Block 1, then Block 2, and stop executing the rules when the subview is closed. Chrome executes all three blocks regardless of the close action. In the case of this specific rule, Block 2 adds a user to the Super Users group and Block 3 evaluates whether the person is already part of the group.

While IE 11 adds the user and quits, Chrome adds the user, then continues, looking into the list that was just edited and returns an warning that the user is already in the list.

To me, the solution with the lightest touch here is to add Stop rule execution actions at the close of each block (boxed in yellow):

A K2 SmartForms Rule with three “blocks” of conditions and actions, separated by stop rule execution actions. These actions may prevent errors occurring in browsers other than IE 11

These actions may prevent errors you didn’t know you had, because they’ll prevent multiple conditions from being evaluated and acted upon. Just remember to be careful about using them for the same reason.

Finally, be clear on what browsers your organization supports. IE 11 is the standard browser in our organization for Windows machines, but some use Chrome as a matter of preference. If you’re getting questions about performance issues in multiple browsers, consult with your infrastructure team about what browsers your organization supports, then check the compatibility matrix (link above) to be sure your version of K2 supports that browser. If you discover any compatibility issues (like K2 4.7 running on IE 9), consider escalating them to your infrastructure team so they can get that user upgraded to a supported browser, or up your chain to set policy. In my case, if I had learned my client won’t support Chrome, I might have made the fix and reminded the user about company policy. A little situational awareness here could help prevent problems in the future (who here runs Vivaldi?).

Stop Rule Execution Actions Help Prevent Cross-Browser Errors

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s