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: 
bluecarbon
Partner - Creator
Partner - Creator

Get the list of tables and fields in Qlikview document through vb macro

Hi,

Is there any way to get list of Tables and fields that is available in a Qlikview document through vb macro?

Thanks,

Rakul.

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

ActiveDocument.GetFieldDescriptions  will return an IArrayOfFieldDescriptions array. Each IFieldDescription has a SrcTables property that will tell you what table(s) the Field appears in.

For an example, download Document Analyzer and look at the extractFields SUB in the module.

QV Document Analyzer http://qlikviewcookbook.com/recipes/download-info/document-analyzer/

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

View solution in original post

7 Replies
m_woolf
Master II
Master II

I'm not sure why you want to use a macro for this.

The $Table system field will give you a list of all the tables.

The $Field system field will give you a list of all the fields.

bluecarbon
Partner - Creator
Partner - Creator
Author

I need those information to get the list of fields used a particular table and then see if there is any new field that was added or not and if that field is not present in a straight table then add that new field to straight table.

Thanks,

Rakul.

effinty2112
Master
Master

Hi Rakul,

                    So when you say "... to get list of Tables and fields ..." you're not talking about tables and fields in the data model, you're meaning table objects in the interface and dimensions used in them?

cheers

Andrew

bluecarbon
Partner - Creator
Partner - Creator
Author

Andrew,

I meant the tables and fields in Data Model i,e created by Binary Load or script.

Thanks,

Rakul.

effinty2112
Master
Master

Hi Rakul,

                    m w's advice was correct.

Try a simple tablebox with fields $Table and $Field

Regards

Andrew

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

ActiveDocument.GetFieldDescriptions  will return an IArrayOfFieldDescriptions array. Each IFieldDescription has a SrcTables property that will tell you what table(s) the Field appears in.

For an example, download Document Analyzer and look at the extractFields SUB in the module.

QV Document Analyzer http://qlikviewcookbook.com/recipes/download-info/document-analyzer/

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

bluecarbon
Partner - Creator
Partner - Creator
Author

Thanks Rob,

Document analyzer always gives sample vb code for all scenarios.

Thanks,

Rakul.