Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm new to qlik view.I'm using records from teradata.I'm having some list boxes I need to store only the selected values from the list box into a new qlikview document on clicking the button object at the same time only the selected values should be displayed in teradata too(using select staement).Please help me out in solving this.Thanks in advance.
To create a new QlikView document that contains only the Current Selections you need to select File \ Reduce Data \ Keep Possible Values and then save this. This should be possible in a macro via the API - but it is not something I have attempted.
As for having QlikView send a selection into TerraData I can't see how it would do this. The closest I can imagine you could get is building a SELECT statement in a Text Object that the user could copy and paste. This would need something like. You would need to concatenate a string with the SELECT part then for the where would would need a mix of GetSelectedCount and Concat to create a WHERE EXISTS IN statement.
Hope that points you in the right direction.
Steve
We can use the bookmark option from Menu Bar or from Book Mark object, to store the current selections.
What I under stand is to display specific data?
You can put the where condition in the store statement of .qvd, base on your selections.
Regards,
To store the selected data into the qvd file and also display the same in teradata.
Ya ,but I have no idea to get the selected field and storing it to variable.
Use GetCurrentSelections()
Ya I tried,but i couldnt use the bookmark name in text box object to display the selected values.
To create a new QlikView document that contains only the Current Selections you need to select File \ Reduce Data \ Keep Possible Values and then save this. This should be possible in a macro via the API - but it is not something I have attempted.
As for having QlikView send a selection into TerraData I can't see how it would do this. The closest I can imagine you could get is building a SELECT statement in a Text Object that the user could copy and paste. This would need something like. You would need to concatenate a string with the SELECT part then for the where would would need a mix of GetSelectedCount and Concat to create a WHERE EXISTS IN statement.
Hope that points you in the right direction.
Steve
I tried to save GetCurrentSelections() into a variable and using the where condition as below; But this is not turning up or storing the values as expected;
LOAD cust_id,
cust_name,
cust_type
FROM
C:\Users\387805\Documents\cust_type.xlsx
(ooxml, embedded labels, table is Sheet1)
WHERE (cust_id = '$(vS)');
LOAD *;
Store cust_type into cust_type.qvd(qvd);
Hi ,
I wrote macro code in the Edit module like this
Sub select_field
set s = ActiveDocument.Fields("V_Id").GetSelectedValues
End Sub
----------------------------------------in Edit script
LOAD cust_id,
cust_name,
cust_type
FROM
C:\Users\<User>\Documents\cust_type.xlsx
(ooxml, embedded labels, table is Sheet1)
WHERE (cust_id = $(s));
Can you please suggest me how to pass the variable from macro to script.?
.
Passing bookmark name into load/select statement is not possible. It shows error.