Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
filippo
Partner - Contributor III
Partner - Contributor III

Table and QlikView

Hello,

it is possible read the content of the tables loaded into QlikView by a macro?

3 Replies
biester
Specialist
Specialist

Hi,

well, I haven't done this before (only read contents of table boxes and so on), but I'd suppose it's possible - there are methods like GetTableName and so on described in the APIGuide. May I ask what you're aiming at?

Rgds,
Joachim

Not applicable

So you're looking to use the data you've already loaded in inside a macro?

You should look at the Field section of the APIGuide.

Here's a piece of an example from the API Guide:

set doc = ActiveDocument
set mySelections = doc.fields("Field").GetSelectedValues

for i = 0 to mySelections.Count - 1
MsgBox(mySelections.Item(i).text)
next

That will loop through all the selected values in a specific field and display them each in a message box.



filippo
Partner - Contributor III
Partner - Contributor III
Author

I solved with this script:

let vNrTables = NoOfTables();
let vListaTable = "";

let vListaField = "";
for a = 0 to $(vNrTables)-1
let vTable = TableName($(a));
i =NoOfFields('$(vTable)');
set vListaTable = $(vListaTable) T_$(a) :[$(vTable)]_fields $(i)",";

for i = 1 to NoOfFields('$(vTable)')
let vField = FieldName($(i), '$(vTable)');
set vListaField = $(vListaField)T_$(a) : C_$(i) [$(vField)]",";

next i
next a

Thanks to All

Big Smile