Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Alternate for lookup() or applymap() function

Hi,

I have a requirement wherein I need to display some text in a dynamic manner. This is bascially a localization requirement, based on language I wish to display some text for a label and there are hundreds of such labels.

Currently I am able to do this using variables and applymap() or lookup() functions in edit script, but this will require me to create hundreds of variables. Since lookup() and applymap() is not working in front-end, is there any alternate for these functions? Or any other way to achieve this requirement? Attaching the sample qvw file.

Thanks for reading this post.

Amit

7 Replies
Not applicable
Author

Good morning Amit,

please see the attached application which supports four languages.

What you neede is a kind of crosstable and a very short macro and "=fieldvalue($(vSprache),107)".

To change a language click on the flag in the right corner.

Good luck!

Rainer

Not applicable
Author

Thanks alot Rainer for your suggestion but my requirement is just to show value for a particular label in a text box. Currently I am able to do this using variable in edit script but I dont want this due to the fact that it requires creating several variables.

Selecting a particular language is not a concern for me, I do that in script due to certain reasons.

Thanks

Amit

Not applicable
Author

Any one has any other idea/suggestion for this requirement? Or creating variables is the only way out..

Thanks

Amit

Not applicable
Author

Hi amit,


I donno whether I can help you but as you are saying u need for many variables why dont u write a

sub fill Variables

for each variable in $(table)

........

.......

next variable

endsub

Use this code always where ever u need to use as

'call fill variables'

Not applicable
Author

Thanks Sravan!

So we cannot do away with variables but can certainly automate creation of these variables using loop..

Regards

Amit

Not applicable
Author

Hello Amit,

You can create a table containing as many field as text you want to convert such as

LanguageTable:

LOAD * INLINE [

Language, text1, text2

FR, OUI, NON

EN, YES, NO

etc...];

Then you use in your objects only(Text1) and set the Language field of the table as always one value selected. And that should work !

Not applicable
Author

Hello Amit,

You can create a table containing as many field as text you want to convert such as

LanguageTable:

LOAD * INLINE [

Language, text1, text2

FR, OUI, NON

EN, YES, NO

etc...];

Then you use in your objects only(Text1) and set the Language field of the table as always one value selected. And that should work !