Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Passing value of variable

I have a list box for countries.

I want to select one country and pass the name of country to database.

How can I do it ?

My Approach:

I am taking the currently selected Country into a variable vCountry = GetFieldSelections(Country)

This shows the value correctly in the text object as vCountry showing the value of currently selected country.

But when I want to pass it further, using $(vCountry), it still passes the value as 'GetFieldSelections(Country)' and not the actual selected country.

I tried using LET in script but still it didnt work, how can I set it to StringContent.

I dont want to use macro.

Kindly help, thanks in advance

Regards

Swapneel

14 Replies
Not applicable
Author

Hi Ruben Marin,

Thanks for that piece of knowledge .

What I want to do is perform a selective load of only a table that I select.

Where I am stuck at is, I am not able to pass the name of table in string format, its taking directly the formula,

I need something like variableName.Content.GetString & variableName.Content.SetString

I need to do this in scripting, so that I dont need macro.

Hope you can help or atleast provide me with an answer as above explaination.

Thanks & Regards

Swapneel

Not applicable
Author

HI Avinash R,

My vision is as follows:

In the front end I am having a list of tables, from which the user can select a table.

This currently selected table should be stored in a variable say vTable,

This vTable variable should be passed in the SQL select command

as Select * from $(vTable).

Thats how I want it.

Thanks & Regards

Swapneel

avinashelite

Thanks for the details , Please check with the below document . As per my knowledge it cannot be achieve at the scipt level using your approach . Need go with macro or extension .

SQL Writeback from QlikView extension object.

rubenmarin

Hi Swapneel,

You can add a trigger that sets the varaiable value when a Table is selected, then you can use this variable in script.

Another option is create predefined values for this variable and add an input box where user selects in the list the value that the variable will store, variable properties can be those:

Not applicable
Author

Thanks for your precious support everyone.

I finally had no option, but to go for the macro approach.

Thanks again, you all have been quick at replies.

Definately count worthy people.

Thanks again.

Regards

Swapneel

View solution in original post