Qlik Community

Ask a Question

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Do More with Qlik - for Beginners and Beyond, Topic: Qlik Replicate on January 21, 2PM EST. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Use Name of Field in Expression, e.g. Label of Tablebox

Hi,

for a multilanguage environment i am trying to create dynamic labels which use the name of the shown field in the expression.

I have a translation table which e.g. contains this:

LanguageFieldLabel
EnglishContact.FullnameContact.Fullname
GermanContact.FullnameKontakt.Vollständiger Name

The column "Field" contains the name of the field in the data model.

The column "Language" is e.g. selected in a listbox.

The column "Label" is supposed to be shown as the label of the column in tableboxes, Graphs and so on.

So in the label of e.g. the tablebox I want to use an expression which filters the table above dynamically to the specific fieldname. The hardcoded way for the label would be:

=Only({<sysUniqueAttribute={'Contact.Fullname'}>} sysUniqueLabel)

But like that i would have to change the label-expression for each column. Isn't there a function or hidden variable by which I can access the name of the label's underlying field in the expression?

Thanks a lot in advance,

Martin

1 Reply
Not applicable

hi,

Yo can create variables for any field for example:

create variable for  Label and in Variable use name v_Variable and write =Label  (You must be use = )

if you create a listbox for you Language field yo can see that if you select English your variable will take Contact.Fullname value. Now in your object label you only need to write $(Label) //The name of your Label Variable. that´s all. If you want to have a default language create another variable named v_Language and write =if(getfieldSelections(Language)<>'English',getfieldSelections(Language),'English')