Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there a way of copying selection criteria made in alternate states to the default state ? And default state to alternate state ?
This will enable the user to refine their investigations based on previous assumptions.
Thanks,
Neil
You can also use set analysis and use the alternate states as set identifier and / or as scope in your set modifiers, maybe like explained here:
http://community.qlik.com/message/209604
Hope this helps,
Stefan
edited by Sara leslie March 17, 2014 to remove an outdated link.
You can also use set analysis and use the alternate states as set identifier and / or as scope in your set modifiers, maybe like explained here:
http://community.qlik.com/message/209604
Hope this helps,
Stefan
edited by Sara leslie March 17, 2014 to remove an outdated link.
Hi,
I was looking for something simple like a button.
I created a button, chose 'Copy State Contents' as an action.
In the Source State box I put <default state> and in the Target state box I put the Alternate State name ( I called it State2).
I was expecting the default selection criteria to be transferred to the State2 selection criteria but nothing happened.
Am I missing something ?
Cheers,
Neil
Try using
$
as default state name in the entry field (just the dollar sign).
Regards,
Stefan
For default state I believe the box needs to be left blank. I modified the demo linked to above and was able to transfer states as required - but on trying exactly the same thing in a different document it did not seem to work.
Odd.
In the last v11.0 version, it works using a blank statement for the Copy State, and Just the name of the altenate state in the 2nd parameter (no = no [] ).
--> But to make it work, I need to have a Current Selection box displaying the Alternate state, and I need to minimize / restore this box to have the copy applied.
--> And after a Copy State action, no other action work, so the minimize / restore can't be in an action.
So I need to try using macro now, it look like the function
ActiveDocument.TransferState "", "AltState"
or ActiveDocument.TransferState "$", "AltState"
works except that the script don't like the "" nor "$" and open the Edit Module windows, and if I clik ok or camcel, the function work.
Bug while geting arround a bug while geting arround a bug ?
Hi,
Now I'm using the following macro lauch by a button.
"Items 123" is the Alternate state name to which I copy the current state .
Sub CopyState
set x = ActiveDocument.GetCurrentSelections
s = x.Selections
v = x.VarId
for i = lbound(v) to ubound(v)
ActiveDocument.Fields(v(i), "Items 123").Select s(i)
set y = ActiveDocument.GetCurrentSelections("Items 123")
w = y.VarId
Flg = 0
for j = lbound(w) to ubound(w)
if v(i) = w(j) then
Flg = 1
end if
next
if Flg=0 then
set z = ActiveDocument.Fields(v(i)).GetSelectedValues(999999999)
ActiveDocument.Fields(v(i), "Items 123").SelectValues z
end if
next
END Sub
Hi,
I cannot access the first link? Restricted access...? Can you help?
/C
Me neither. It may be that it was posted in a group that has subsequently been closed - there has been a bit of a clean up recently. Perhaps Sara Leslie can advise?
Thanks Steve- I checked the thread and this is from an ask the expert event a while back and has been retired. The thread was valid when the poster originally added it but not now.
I will remove the first link for him.
BR, Sara