Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI all,
I am attempting to change(set) the date format for my App based on the Country Code in our data base using the following code in the data load editor:
If $(vCountry) = 'CA' then
Set DateFormat = 'D/M/YYYY';
Else
Set DateFormat = 'M/D/YYYY';
End If;
vCountry is set earlier in my script when the country code is loaded.
I keep getting the following error:
Unexpected token: '=', expected one of: '(', 'ZTestw_z', 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'not', 'bitnot', 'LITERAL_NUMBER', ...
May be try this like this...
If '$(vCountry)' = 'CA' then
Set DateFormat = 'D/M/YYYY';
Else
Set DateFormat = 'M/D/YYYY';
End If;
Although this might fix the error, I am not sure if this is actually going to work or not... I will be curious to know if it does work in setting different DateFormats based on Country
No Joy. Still got the same error. Thanks for the suggestion tho!
How is vCountry set? Can you share the script for that
Sure, here you are:
gra_plant_setup:
let vCountry = peek([Plant Country];
LOAD
PLANT_SETUP_KEY,
PLANT_CODE,
PLANT_NAME,
[Plant Country],
[Days Till Due]
WHERE EXISTS(PLANT_SETUP_KEY);