get user preference date format
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2023 11:35 PM
Hi,
I want to get user preference date format and I have a form field called modified which is concat of u_last_update & u_updated_by. These two fields are not being displayed on the form I want to get user preference format and set it accordingly and use it on modified . Can I use onLoad script and use it? But how exactly I get the format
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2023 11:42 PM
what type of fields are those?
why not use server side script i.e. BR and set the value? anyhow that field is not on form then you can use business rule
what script did you start with and where are you stuck?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2023 12:16 AM
@Ankur Bawiskar The 'last_update' is date field and the Update by is string . And the Modified is string field which is concact of these both. Initially I was using function field to concat but the date format of last_update was not coming to according to user preference date foemat but it was every time coming the same format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2023 12:33 AM
share that script
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2023 12:41 AM
for function field in function definition I have written
glidefunction:concat(u_last_update,'-',u_updated_by)
