Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to select a field with alternate state using a macro

I want to select a field with alternate state using a macro.

The following statement works for the field with default state.

ActiveDocument.Fields("Aisle").Select  "Aisle1",true

I want to extend this to be used with an alternate state called "State1".

I tried the following but no luck so far;

ActiveDocument.Fields("State1::Aisle").Select  "Aisle1",true

ActiveDocument.Fields("{State1}Aisle").Select  "Aisle1",true

Can someone shed some light here pls.?

1 Solution

Accepted Solutions
mchasse1
Contributor II
Contributor II

...Better late than never.
Either of the below lines should work for you:
ActiveDocument.GetField("Aisle", "State1").Select "Aisle1", True
ActiveDocument.Fields("Aisle", "State1").Select "Aisle1", True

View solution in original post

5 Replies
mchasse1
Contributor II
Contributor II

...Better late than never.
Either of the below lines should work for you:
ActiveDocument.GetField("Aisle", "State1").Select "Aisle1", True
ActiveDocument.Fields("Aisle", "State1").Select "Aisle1", True

View solution in original post

Not applicable
Author

Thank you a million times for this mchasse1, it worked.

nathanfurby
Specialist
Specialist

A late thank you mchasse!  Really useful - why they can't put this in the documentation or at least the API Guide is beyond me!!

jcooney1
Contributor III
Contributor III

Thank you Mike.

Out of morbid curiosity, where would one locate this information in documentation??

Not applicable
Author

Thanks Mike, I will be able to sleep tonight now