Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
paul_hallwood
Contributor II
Contributor II

Concatenating a string and a variable to use a field

I have a variable defined as follows:

SET varData_Status_YEAR = [Year] & '_' & Right(([Year] + 1),2);

I was then hoping to use the value of this variable with a string to select a field to use in a textbox.

e.g. here are the fields that are brought into the Qlikview document whose values I am looking to display:

Data_Status_April_2012_13

Data_Status_April_2013_14

Data_Status_April_2014_15

If I want the value of one of these to be displayed in a text box how do I go about this using the variable varData_Status_YEAR?  Is it possible?

I've tried the following to no avail:

 

=('Data_Status_April_' & $(varData_Status_YEAR))

 

='Data_Status_April_' & $(varData_Status_YEAR)

...and countless other iterations, but no joy.

If anybody has any suggestions that will be much appreciated.

6 Replies
Not applicable

Try in the text object to write this:

= CONCAT ( 'Data_Status_April_'&$(varData_Status_YEAR),' ')

let me know it help you

Anonymous
Not applicable

try

='Data_Status_April_' & '$(varData_Status_YEAR)'

alexandros17
Partner - Champion III
Partner - Champion III

The problem is that you have many records with YEAR value so in a text box which one should be displayed?

The concat is a solution but you will see all records in your text box, while I think you need only one value

So write 'Data_Status_April_' & $(varData_Status_YEAR) but select one year ...

Let me know

paul_hallwood
Contributor II
Contributor II
Author

Thanks for the reply Matteo, but unfortunately this hasn't worked.

paul_hallwood
Contributor II
Contributor II
Author

Unfortunately this hasn't worked either Rudolf.

paul_hallwood
Contributor II
Contributor II
Author

Yes, you are quite correct Alessandro, there will be many years to choose from, but I do just choose the one.

Thanks for the suggestion, but it's still causing me an issue!

Any other suggestions welcome...