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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart does not show selected row in alternative state when select from macro

Hi experts,

I am trying to make a selection using run macro.

It worked when I am in default state and using following script

ActiveDocument.Fields("Member").Select "(100000|1000001)"

But if doesn't do the selection if I update my sheet to be a specific Alternative State. The script I used was the following.

ActiveDocument.Fields("Member","State_Sampling").Select "(100000)"


Could anyone give me some advice to see what I didn't do right?


Thanks

1 Solution

Accepted Solutions
marcus_sommer

Maybe only the select-criteria isn't correct and it should be:

.Select 100000 instead of .Select "(100000)"

another possibility is a typo by the state-name.

- Macus

View solution in original post

2 Replies
marcus_sommer

Maybe only the select-criteria isn't correct and it should be:

.Select 100000 instead of .Select "(100000)"

another possibility is a typo by the state-name.

- Macus

Not applicable
Author

yea, it seemed there were some incorrectness in my script originally. I tried it again then it worked. providing the correct code below

  ActiveDocument.Fields(v_Identifer, v_StateName).Select "(" & str & ")"