- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2020 03:21 PM
Hi all,
I have a UI Parameter assigned to a create new function that needs to set a reference field to the user table on a record. The field should auto populate the field on the mobile form to the logged in user. However, whenever I set the "input source" to "autofill" and set the "input type" to "user" (per this doc https://docs.servicenow.com/bundle/orlando-mobile/page/administer/tablet-mobile-ui/task/sg-assign-pa...) the field is no longer appearing on the form. If I set the "input source" to "user input" and the "input source" to "SearchList" it works fine. I can even set the default value to javascript:gs.getUserID(); and it will populate the value correctly.
I'd prefer to use the autofill functionality if possible, does anyone have any suggestions on what may be happening or how to fix it?
Thanks!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2020 03:34 PM
Autofill will not show field on view but it will auto populate the value in backend. If you want to show field on form then using default value and make it ready only is the best approach.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2020 03:34 PM
Autofill will not show field on view but it will auto populate the value in backend. If you want to show field on form then using default value and make it ready only is the best approach.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2020 09:19 AM
Hi Mike, I tried this out this morning and you're correct it does work. Interesting that they don't display the field.
I'll use the default value approach. Question with date fields, do you know if you can populate the default value of a date/time? I've tried javascript:gs.nowDateTime(); but that doesn't seem to work... thoughts?
Thanks again!
- Derek

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2020 10:25 AM
I never had requirement to do date/time default so I'm not sure about it.
try few thing
- new GlideDateTime();
- gs.now();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2020 10:57 AM
Yeah... tried both of those with no luck... all well, thank you!