Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Equivalent to LOOKUP or APPLYMAP as be used in charts or variables

Hi everyone,

Both functions LOOKUP and APPLYMAP can only be used in the script but I want the equivalent as I can use it directly in charts or tables.

I have my mapping table (variable) in the script, see attached QVD.

What I want to do is be able to switch between the headed fields what they are called in the database and what they are called in plain text using the button ("DB", "Plain Text").

I know there is FieldValue-function but it requires "elem_no" and it can be difficult to keep track of it if you have more than one 100 of variables.

Eg. field "TypeOfAcc" called "TOA" in the database and "type of accident" in plain text.

What should I write in the label field for the variable to be able to switch between the two names, depending on the button?

Thank you in advance.

5 Replies
Gysbert_Wassenaar

I'd simply rename the fields to the names the end user should see. If necessary you could include a table where the original field name can be looked up.


talk is cheap, supply exceeds demand
marcus_sommer

Alternatively to Gysbert Wassenaar suggestion you could use pick(match()) similar as applymap().

- Marcus

Not applicable
Author

Hi Gysbert,

It is the users who want to be able to see both names and ideally be able to change themselves in all the diagrams and tables.

Hi Marcus, can you please make an example of QVD file with Pick (match ())?

Best regards

Khabat

Gysbert_Wassenaar

Then try the approach explained here: Handling Multiple Languages. Instead of multiple languages you want multiple names for fields, but that's the same kind of problem.


talk is cheap, supply exceeds demand
marcus_sommer

To pick(match()) have a look here: http://community.qlik.com/search.jspa?q=pick%28match%28

- Marcus