I try to get a value back in calculations method of a datasource by using application.getValueListDisplayValue.
Used code:
- Code: Select all
function show_incoterms() {
if (incoterms) { //{Number}
return application.getValueListDisplayValue("incoterms2010",incoterms);
}
return null;
}
The valuelist "incoterms2010" looks like:
- Code: Select all
EXW|%%scopes.constants.LEVERING_INCOTERMS.exw%%
CFA|%%scopes.constants.LEVERING_INCOTERMS.cfa%%
etc.
and:
- Code: Select all
var LEVERING_INCOTERMS = {
exw: 1,
cfa: 2,
etc.
This doesn't work!
But when the valuelist look like:
- Code: Select all
EXW (ophalen)|1
CFA (naar kweker / loods - ALLEEN over land)|2
etc.
It works fine. But I don't want a code on 2 places.
How can I avoid this? What do I wrong?
Thanks al ready.