Hi all,
I have a parameter table, in which the translation is stored per Country and per language
as following, categorized by param_type. The param_code is used for the mapping to extract the param_text . Note that there are not always translation (text) in all languages, if no text/translation is found, we show the code instead
param_type | param_country | param_langue | param_code | param_text |
param_group | USA | EN | chd01 | Demonstration |
param_group | USA | FR | chd01 | Démonstration |
param_group | FRA | FR | chd01 | démo FR |
param_group | FRA | FR | chd01 | démo FR |
param_group | USA | FR | cheveryone | Région Everyone |
param_group | FRA | EN | cheveryone | Region Everyone |
param_group | FRA | FR | chl01 | Linéaire 01 |
param_group | USA | EN | chl01 | Linear 1 |
param_group | USA | EN | chl99 | Key-Account |
param_group | FRA | FR | chl99 | k-accounts |
param_system | USA | EN | sys1 | System 1 |
param_system | USA | FR | sys1 | Système 1 |
param_system | FRA | FR | sys1 | Système 1 |
param_system | USA | EN | sys2 | System 2 |
param_system | FRA | FR | sysw | Système 2 |
Data is store as following, we need to display on the interface (as dimension of a pivot table) the text/description corresponding to the codes: values in column "group_code" can be found within param_type = 'param_group' according to the Country (available in data rows and the application's language (do not available during scriptting, but via a variable vDataLanguage)
id | country | group_code | system_code | price |
1 | USA | chl01 | sys1 | 100 |
2 | FRA | chd01 | sys2 | 200 |
3 | USA | chl99 | sys1 | 500 |
I need to achieve the following
If vDataLanguage = FR | |
ID | Country | Group | System | Price | |
1 | USA | (chl01) | Système 1 | 100 | (chl01 has no translation in USA / FR so we show the code) |
2 | FRA | démo FR | Système 2 | 200 | |
3 | USA | (chl99) | Système 1 | 500 | (chl01 has no translation in USA / FR so we show the code) |
If vDataLanguage = EN | |
ID | Country | Group | System | Price | |
1 | USA | Linear 1 | System 1 | 100 | |
2 | FRA | démo FR | (sys2) | 200 | (sys2 has no translation in FRA / FR so we show the code) |
3 | USA | Key-Account | System 1 | 500 | |
I had followed a solution, which is add 2 additional columns per param_type ( for example group_text_EN, group_text_FR, etc...)into the Data table during load, using ApplyMap. Then once in the interface, I set up the expression inteads of a fixed field (If vDataLanguage = 'EN', group_text_EN, group_text_FR). The problem is, when a user select a value, in Active Selection box, we see both fields appeared (group_text_EN = 'value', group_text_FR='...'). Even worse because in reality I have 3 languages.
Any proposal to improve or do this differently ?
Thanks a lot