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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concat string variable

I'd like to have my user enter a path as input variable. e.g strUserpath = 'G:\Bob\May' Then I want to load a list of company and file locations e.g.

Company Location

ABC          \ABC\Broker\1234412

ABC          \ABC\Brokers\123413

XYZ          \Sales\Forecasts\12345

DEF          \Reports\Activity\113414

and create a straight table with a new column whose expression is:

$(strUserpath) & Location

But this doesn't work; it doesn't seem to recognize strUserpath as a string. The column just shows the Location.

I tried =concat($(strUserpath),Location)) but that just returned a blank column.

Once again, the documentation is no help,

When using a variable for text replacement in the script or in an expression,
the syntax $(variablename )  is used. $(variablename) expands to the value in variablename.

because it sure doesn't seem to be doing that for me!

2 Replies
swuehl
MVP
MVP

Hi kevinbmsr,

could be, that your variable is not recognized as string when expanded.

Try enclosing your variable within single quotes:

='$(strUserpath)' & Location

See also attached.

Hope this helps,

Stefan

senpradip007
Specialist III
Specialist III

Hi kevinbmsr,

you can try with the expression ='$(strUserpath)' & Location

Hope it helps you

Pradip