Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
MVP & Luminary
MVP & Luminary

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
Highlighted
MVP & Luminary
MVP & Luminary

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

- Marcus

Highlighted
Not applicable

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

Highlighted
MVP & Luminary
MVP & Luminary

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
Highlighted
MVP & Luminary
MVP & Luminary

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

- Marcus