Discussion Board for collaboration related to QlikView App Development.
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 ?
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
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.
Not sure what you are trying to do here, but the variable definition should be
where the = is part of the definition. Now $(vCountry) will return the selection.
In a set statement
Set vCountry = =GetFieldSelections(Country);
(the = = is not a typo)
Hi Swapneel, GetFieldSelections() won't work in script, in this case you should do a FOR bucle, ie:
FOR i =0 to NoOfRows('tablesList')-1
LET vTable=Peek('Tables', $(i), 'tablesList');
SELECT * FROM [DEVS_ID.$(vTable)];
This will load all your tables wich most probably will return a mess of tables. Only way I see this working is if all the tables returned in tablesList have the same fields.
What are you trying to do?
How your trying to read? that is user will make the selection in the front end of your dashboard and then your trying to push this to DB? if so your variable set should work. But if your trying to capture in the script then we need to think how your doing....can you please answer my questions