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.

luciancotea
Valued Contributor

QlikView 11 Alternate States: copy a state to another

I'm using the following code:

sub CopyState

     ActiveDocument.TransferState "", "Reference"

end sub

to copy current selections to a reference state. In a fresh, empty qvw, it works as expected. So far, so good.

When I use the code into an existing qvw, assign the macro procedure to a button and press the button, I receive "Error parsing macro, functionality is lost" error.

But the macro has no error. Through tests, I see that the problem is the first empty parameter "". There's no problem when I use another state name.

I receive error even using the code: set a = trim(" ")

Or, is there any other way to reffer to default state? I tried to use "<inherited>", "$", "<default>"... no luck.

1 Solution

Accepted Solutions
luciancotea
Valued Contributor

QlikView 11 Alternate States: copy a state to another

I found out that removing Section Access fixed my problem. Geez...

4 Replies
luciancotea
Valued Contributor

QlikView 11 Alternate States: copy a state to another

I found out that removing Section Access fixed my problem. Geez...

Not applicable

Re: QlikView 11 Alternate States: copy a state to another

Hi Lucian


I'm experiencing the same issue, were you able to get Copy States to work with Section Access?

Not applicable

Re: QlikView 11 Alternate States: copy a state to another

Yes, when I'm using section access, the copy alternate state action is not work!

Not applicable

Re: QlikView 11 Alternate States: copy a state to another

But I found out one secret...

I try to put another action in the same button before the "Copy State Contents" action,

Run Macro

SUB Save

   ActiveDocument.Save

END SUB

it's works!