Variable Default Value Using javascript:gs.getUser() Does Not Save Logged-In UserIssue Setting a Service Catalog variable's default value to javascript:gs.getUser() or similar expressions does not store the expected user in the record. Instead, it stores the literal string, which causes incorrect or misleading behavior when viewed by other users.SymptomsCatalog item variable default value is set to:javascript:gs.getUser()After submission, the variable does not store the submitter's user record.When another user views the RITM or catalog task, the variable appears to show their own name, not the original requestor.CauseWhen setting a variable’s default value to javascript:gs.getUser() or similar: The platform saves the literal string as the value, not the resolved user object or sys_id.On form load, the system dynamically resolves that string in the browser, resulting in the currently logged-in user being displayed—even though they were not the original submitter. This leads to confusion and data inconsistency. Correct Implementation To store the currently logged-in user's sys_id reliably at submission time, use a Catalog Client Script with GlideAjax: 1. Script Include (set to Client Callable) var GetCurrentUser = Class.create();GetCurrentUser.prototype = Object.extendsObject(AbstractAjaxProcessor, { getUserID: function () { return gs.getUserID(); // sys_id of the current user } }); 2. Catalog Client Script (Type: onLoad) function onLoad() { var ga = new GlideAjax('GetCurrentUser'); ga.addParam('sysparm_name', 'getUserID'); ga.getXMLAnswer(function(response) { var userSysID = response; g_form.setValue('user_variable_name', userSysID); // Replace with your variable name });} gs.getUserID() returns the sys_id of the logged-in user (e.g., 6816f79cc0a8016401c5a33be04be441).Using this method ensures the correct user is saved at the time of form submission.Resolution1. Use a GlideAjax-based client script to set the variable value dynamically on form load. This approach: Captures the logged-in user at the time of submissionSaves the sys_id in the variable fieldPrevents misleading user data when viewed by others 2. Alternately, you can set the default value of a reference user field to: javascript:gs.getUserID() Related LinksService Catalog variableAJAXUseful Glide System User Object methods