Country field
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2024 06:18 AM
Hi Team,
Can anyone help me country name is Korea, Republic of. but it is splitting up into choices.one is Korea and other is Republic of. What could be the reason.
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2024 06:49 AM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2024 07:22 AM
var getemployeecountryandstate = Class.create();
getemployeecountryandstate.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
populatedCountry: function() {
var employee = this.getParameter('sysparm_employee');
var gr = new GlideRecord('sys_user');
gr.addQuery('sys_id', employee);
gr.query();
if(gr.next()){
return gr.location.country + ',' + gr.location.state + ',' + gr.location.city;
}
},
populateDestinationState: function(){
var array = [];
var country = this.getParameter('sysparm_country');
var gr = new GlideAggregate('cmn_location');
gr.addQuery('stateISNOTEMPTY');
gr.addEncodedQuery('country=' + country);
gr.addAggregate("COUNT");
gr.groupBy("state");
gr.orderBy();
gr.query();
while (gr.next()) {
array.push(gr.state.toString());
}
return array.join(',');
},
populateDestinationCountries: function(){
var array1 = [];
// var country = this.getParameter('sysparm_country');
var gr = new GlideAggregate('cmn_location');
gr.addEncodedQuery('countryISNOTEMPTY');
gr.addAggregate("COUNT");
gr.groupBy("country");
gr.orderBy();
gr.query();
while (gr.next()) {
array1.push(gr.country.toString());
}
return array1.join(',');
},
type: 'getemployeecountryandstate'
});
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2024 07:50 AM
did you check what value is stored in country field on cmn_location table?
whatever value is present in field will come in the script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2024 07:40 AM
@Ankur Bawiskar please help