Try that on OnActivate action, Selection, select in Field
Choose your field: State
And put that in the search string:
replace( '(' & concat($ YourExpression, '|') &')', ' ', '?')
where YourExpression is aggr(if(rank(sum(value))<=10,State),State)
As usual, if you do selection instead of the user, you need to warn it with a textbox or sth similar.
1) Clear field first in action 1 (if not the first 10 will be searched into the current state)
2) in action 2, do not forget the = sign before the replace() function
3) in sum(value), it is also possible to insert a set analysis (or clear specific fields first) because this sum will depend on the current state
But you are right it does not work: a button with this action works, the OnActivate does not work
create a variable with =replace (xxxxx)
and the action becomes ='$(newVariable)'
(do not forget the quotes)
I tried with a button, but it doesn't work yet.
I did the following:
1) create button
2) rule1: "Clear filters in field Stato"
3) rule2: "Set filter in field "Stato"" like this:
=replace( '(' & concat($(aggr(if(rank(sum(Imponibile))<=10,Stato),Stato)), '|') &')', ' ', '?')
Only the first rule works...
Where is the problem?