Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Translations not working within calculation conditions

Hey All,

I'm wondering if anyone else has run into this problem before.  I'm working on a document that needs to be completely translatable.  We are translating all of our field names using the following statement in the load script:

Rename fields using FieldMap;

This works find just about everywhere.  Fields are renamed, and all references to them are updated.  For example, Customer.Code is renamed to "Customer" (when using english of course), and when we choose a different language all references are changed to that respective language.

The problem I am running into is that this does not seem to work in the calculation condition for an expression on a chart.  The calculation condition does not update Customer.Code to be "Customer" as it should.

Has anyone else run into this?

Thanks,

Ken

1 Solution

Accepted Solutions
Not applicable
Author

Hi ken

I can think of two options:

1) add another field that has the customer code in it, that remains the same and reference that (possibly keep customer.code)

2) save the expression into a variable.

So the variable will look like vCalcCondition = Customer = 123456

It will be referenced in the calculation condition  as just = vCalcCondition

You can set the variable in the script

let vCalcCondition =  '=Customer = 123456';

this way, you can use your previously loaded customer field names using the map

ie

let vCalcCondition = '=' & applymap('fieldmapName',Customer.Code)&' =  123456';

Erica

View solution in original post

2 Replies
Not applicable
Author

Hi ken

I can think of two options:

1) add another field that has the customer code in it, that remains the same and reference that (possibly keep customer.code)

2) save the expression into a variable.

So the variable will look like vCalcCondition = Customer = 123456

It will be referenced in the calculation condition  as just = vCalcCondition

You can set the variable in the script

let vCalcCondition =  '=Customer = 123456';

this way, you can use your previously loaded customer field names using the map

ie

let vCalcCondition = '=' & applymap('fieldmapName',Customer.Code)&' =  123456';

Erica

Not applicable
Author

Thanks Erica!  I was able to get option #1 to work for me.  It may not be an ideal solution, but it works!