Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
preetipandey1
Partner - Contributor
Partner - Contributor

Use column values as variable name to display value in testbox

Hi All,

I have one filed call Project Name and I want to set different highlight text with respect to each Project Name.

On selection of every project I want to see different different variables value.

For example: I have 2 Projects A and B

For each project I have created variable like VarA and VarB and using input box I want to set value of variable for selected project.

Dynamically I want to display values of these different variable with respect to project selection in same text box.


(I have more then 100 Projects Name and Variables are Var1, Var2..............Var101)

4 Replies
nitin_01
Creator
Creator

Hi Preeti

         As per my understanding, you have an input box where you need to show the project name if any selection is made in 'Project Name' field or list box is it?

or

You have input box where you type the value and that value should b stored in variable?

Which is your case from above ?

Regards,

Nitin.

tresesco
MVP
MVP

If you just want to show the selected Project Name in text box, you might not have to do such cumbersome task to create all those variables, you could just try expression like below in the text box:

= 'Selected Project  : ' & [Project Name]


Assuming [Project Name] is your field name. The above expression would show your selected project only when a single project name is selected. When nothing is selected, you would see nothing. If you want to select multiple values and see them, try like:

= 'Selected Project  : ' & GetFieldSelections([Project Name], ' ,')

preetipandey1
Partner - Contributor
Partner - Contributor
Author

Hi Nitin,

I have input box where I am typing the value and it should store in variable which should be variable of selected projects and also I want to display this in a test box.

Thanks,

Preeti

nitin_01
Creator
Creator

well u can create a blank variable like, 'v_selection' without any value and take this variable in text object as well as in input box.

or

Create variable v_selection = getfieldselection(ProjectName) and take this variable 'v_selection' in text object which will selection in input box and text object

Regards,

Nitin.