This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.

Issue

K2 SmartForms is returning the incorrect username when using the K2 Context Logged in Username to populate a data label with. 

Symptoms

User details incorrectly returned, this however only returns an incorrect username for some of the users and not all users.

Resolution

This resolution was a combination of two solutions:

  1. The expression used to trim down logged in users system name was altered to use a replace instead of trimming it from the sides Example: Replace(SystemUserName, TextToReplace, [EmptyString]).
  2. A new feature that was shipped for 4.7 had to be activated.
Features Purpose:
  • This feature changes the way K2 query's results from AD and did resolved the majority of the issue.
Feature Activation:
  • From the [HostServer].[SecurityLabel] Table in SQL the RoleInt was altered and the "TranslateWithDirectoryServices=False;" had been added to activate the feature as it is deactivated by default.
Why would this be needed:
  • Something changed on AD - perhaps an AD migration was done or some users details had changed, or even AD specific permissions for the K2 service account had been changed.

This feature was shipped with 4.7 and will not work in any K2 versions pre 4.7