In ThingworxStorage logs the logger user is different than the user returne by Resources["CurrentSessionInfo"].GetCurrentUser();
The service I have try to set a property to the user:
logger.debug(l"Input->PlantUPL-> " + PlantUPL);var user = (UserName!=null) ? UserName : Resources["CurrentSessionInfo"].GetCurrentUser();logger.debug(l "User-> " + user);Users[UserName].LastPlantUPL = PlantUPL;
The Script Log shows this error:
Somehow user U529679 is in the logs but u106949 is the current user in the Resource.
This article might be relevant. It looks like the returned string value needs to be typecast to a User type.
Try something like:
var currentUser = Resources["CurrentSessionInfo"].GetCurrentUser();var result = Users[currentUser].property1;
-- Craig A.
If the response provided by @CRArko answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.
Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!