- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2019 12:00 AM
Hi All,
Can anyone please help me on how to auto populate the country code in phone number variable in catalog item.
Thanks,
Sri
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2019 12:43 AM
Do you want to populate the country code based on logged in user ?
if yes you can write glide ajax here , and call it in your client script to set it at beginning of the value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2019 12:04 AM
Hi
could you please provide screen shot for variable ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2019 12:14 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2019 12:37 AM
hi,
write default value of the variable
javascript: var countryCode; var user = new GlideRecord('sys_user'); if (user.get(gs.getUserID())) {countryCode = user.country}; countryCode;
Thanks,
Rahul Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2019 12:43 AM
Do you want to populate the country code based on logged in user ?
if yes you can write glide ajax here , and call it in your client script to set it at beginning of the value.