[Mobile Agent] Parameter Screen with Reference Input with Autofill Variable of Type User
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2022 06:01 AM
Hi,
In Agent Mobile application I have created an action to create new Incident using Parameter Screen configuration with inputs.
I have an input Caller type Reference. I want to autopopulate field with currently logged user.
I use input Autofill variable with type User, but it fills the field with sys id instead of display name.
Variable Type user according to documentation do not have any attributes to define.
To achieve my goal I have also tried to use Variable type Scripted, with attribute Script and Value reference to Script Include where I return display name of logged user, but it seems like Script Include is not accessed. With this config there is no autofill at all.
PS. I had also tried simple return of gs.getUserDisplayName().
Could you help please?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2022 11:01 PM
Then this display flag is not set properly in User table
- Goto System Definition > Tables
- Open sys_user table
- Check whether any Column has "Display" field set to true. If not then set "Display" field as true for Column with "Name" as Column Label
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2022 10:55 PM
It is better to have just passed the default value in that Item parameter which is created by you in the related list under the Action item.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2023 12:43 AM
Hello @Community Alums
Not sure if you have already got a solution for this. But there is one from Service Now as something as below by creating a new Script include following the article. https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1166399
var getUserDetails = Class.create();
getUserDetails.prototype = {
initialize: function() {},
getUserObj : function ()
{
var userId = gs.getUserID();
var userName = gs.getUserDisplayName();
return {
"Value" : userId,
"DisplayValue" : userName
};
},
type: 'getUserDetails'
};
Please mark this answer as correct as it could help others as well.
Thank you,
Bala