Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
joey_lutes
Contributor

Fieldname String Concatenation

I hope this one's simple . . .

Using a consistent naming convention, I wish to dynamically concatenate a fieldname and have it be recognized by Qlik Sense as a dimension in an object.


In my Data Model, I have several tables similar to:

ThingX:

x.idx.namex.datex.type
12345name112-01-2016type1
23456name212-01-2016type2
34567name312-02-2016type2

Sample list of tablenames and fieldnames would be:

ThingXThingYThingZ
x.idy.idz.id
x.namey.namez.name
x.datey.datez.date
x.typey.typez.type

Also a variable:  vDim


Based on selection I wish to create  $vDim & '.id' (name, date, type, etc) in order to produce a straight table or filter box with the associated data - as if I had typed x.id as dimension, it would display 12345, 23456, 34567 accordingly

To support this, I've added a table:

Dim

     Load * [Inline

     ThingX, ThingY, ThingZ

     x, y, z];


Also a variable:  vDim

User selects a dimension ( $(vDim) - enabled in a Branch extension)

In a straight table and filter box  I've tried:

'$(vDim)'&'.id'

$(vDim)&.id

='$(vDim)'&'.id'    - produces ThingX.id literal (great for use in Labels/Titles)

=$(vDim)&'.id'     - this produces x.id in the table, but only 'x.id' literal - Qlik doesn't recognize that it's the field name.

I've realized I'll need the = sign it looks like, but it just doesn't seem to recognize that it's the name of the field and to treat it accordingly.

Thanks!

3 Replies
MVP
MVP

Re: Fieldname String Concatenation

Depending on your context, you probably need one of these two for x.id

[$(vDim).id]

$(=[$(vDim).id])

And similarly for the other fields.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
joey_lutes
Contributor

Re: Fieldname String Concatenation

That's awesome - the first one worked . . . for like 3 seconds, then when I clicked on another dimension, it stopped and refuses to display again!!!  MOODY APP!!!

Ideas on that?

joey_lutes
Contributor

Re: Fieldname String Concatenation

The problem was the Branch Extension

The first solution worked - thanks again!!

Community Browser