Skip to main content

Hello.

I have a dependent drop down on a field (req_type) where if a certain value is selected, it will display options. The issue is that when a French user selects a req_type, the values default to English (see below 1.0). How do I get the message translation to work in my client script?

 

1.0

 

showProgressIndicator();
var reqType = getControlValue('request','req_type');

var emptyOptions = =];
var options = createCodeTableOption('','');
arrayPush(emptyOptions, options);
setControlOptions('request', 'user_def22', emptyOptions);

if(reqType == 'EMERGENCY') {
var opt1 = =];
arrayPush(opt1, createCodeTableOption('EXPLOSION','Explosion'));
arrayPush(opt1, createCodeTableOption('FIRE','Fire'));
arrayPush(opt1, createCodeTableOption('LEAK','Leak'));
arrayPush(opt1, createCodeTableOption('OTHER','Other'));
arrayPush(opt1, createCodeTableOption('SMELL','Smell'));
setControlOptions('request', 'user_def22', opt1);
} else if(reqType == 'PICKUP_TANK' || reqType == 'CYL_RECERT_PU' || reqType == 'B51_PICKUP_TANK'){
var opt2 = =];
arrayPush(opt2, createCodeTableOption('LOST_ALT_ENRG', 'Lost - Alternative Energy'));
arrayPush(opt2, createCodeTableOption('LOST_BUS_CLSR', 'Lost - Business Closure'));
arrayPush(opt2, createCodeTableOption('LOST_COO', 'Lost - COO'));
arrayPush(opt2, createCodeTableOption('LOST_CRED_BAD_DBT', 'Lost - Credit/Bad Debt'));
arrayPush(opt2, createCodeTableOption('LOST_CUST_SERV', 'Lost - Customer Service'));
arrayPush(opt2, createCodeTableOption('LOST_DEC', 'Lost - Deceased'));
arrayPush(opt2, createCodeTableOption('LOST_DEL', 'Lost - Delivery'));
arrayPush(opt2, createCodeTableOption('LOST_FEES', 'Lost - Fees'));
arrayPush(opt2, createCodeTableOption('LOST_IT_ONLY', 'Lost - IT Only'));
arrayPush(opt2, createCodeTableOption('LOST_PRICE', 'Lost - Price'));
arrayPush(opt2, createCodeTableOption('LOST_SERV', 'Lost - Service'));
arrayPush(opt2, createCodeTableOption('LOST_TEMP_LOC', 'Lost - Temporary Location'));
arrayPush(opt2, createCodeTableOption('LOST_UNSF_CON', 'Lost - Unsafe Condition'));
setControlOptions('request', 'user_def22', opt2);
} else {
var opt3 = =];
setControlOptions('request', 'user_def22', opt3);

}
hideProgressIndicator();

 

Hi ​@qquac,

 

It looks like you are missing the ‘getMessage’ which is needed for translations. Please give that a try and see if you then see the correct values.

 

Best Regards,

Morris


Reply