Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Macro to get list of ALL fields tagged with $dimension

Hi Guys,

I am having trouble with writing a macro to loop through all fields existing in a documents and identifiy the ones tagged with $dimension.

The problem is that I don't know how to get the initial list of ALL existing Fields in the active document.

Can you help me with that?

Thanks,

Carmen

Tags (1)
1 Solution

Accepted Solutions

Re: Macro to get list of ALL fields tagged with $dimension

Hi,

     Below code will give you list of fields.

Sub Test
Rem ** Show name of all non-system fields in document **
set flds = ActiveDocument.GetFieldDescriptions
for i = 0 to flds.count - 1
    set fld = flds.item(i)
    if not fld.IsSystem then msgbox(fld.Name)
next

End sub

Regards,

Kaushik Solanki

2 Replies

Re: Macro to get list of ALL fields tagged with $dimension

Hi,

     Below code will give you list of fields.

Sub Test
Rem ** Show name of all non-system fields in document **
set flds = ActiveDocument.GetFieldDescriptions
for i = 0 to flds.count - 1
    set fld = flds.item(i)
    if not fld.IsSystem then msgbox(fld.Name)
next

End sub

Regards,

Kaushik Solanki

Not applicable

Re: Macro to get list of ALL fields tagged with $dimension

Great! That is what I needed.

Thanks a lot,

Carmen