I cannot operate on the Dataset I am dynamically filtering. Minimal example follows.
DynamicModule[{ds, class, sex, current},
Column[{
PopupMenu[Dynamic@class, {"1st", "2nd", "3rd"}],
PopupMenu[Dynamic@sex, {"male", "female"}],
Module[{},
current =
Dynamic@ds[Select[#"class" == class ∧ #"sex" == sex &]];
DynamicSetting@current[GroupBy["age"]]
]
}]
,
Initialization :> {ds = ExampleData[{"Dataset", "Titanic"}];}
]
I have tried Setting instead of DynamicSetting. I also tried moving the Dynamic into the Select on both class and sex.


Dynamic[Setting[_]]works butDynamicSetting[_]doesn't. I thought that is whatDynamicSettingwas used for. – Edmund May 26 '16 at 01:41Moduleas there are several lines of code there and I prefer to contain them in module inside ofColumnas a style point. Feels cleaner to me. – Edmund May 26 '16 at 01:48
– Edmund May 26 '16 at 12:57DynamicModule[{ds, class, sex, current}, Column[{ PopupMenu[Dynamic@class, {"1st", "2nd", "3rd"}], PopupMenu[Dynamic@sex, {"male", "female"}], Dynamic[current = filter[class, sex]]; current[GroupBy["age"]] }], Initialization :> {ds = ExampleData[{"Dataset", "Titanic"}]; filter[c_, s_] := ds[Select[#"class" == c \[And] #"sex" == s &]]}]]:DynamicModule[{ds, class, sex, current}, Column[{PopupMenu[Dynamic@class, {"1st", "2nd", "3rd"}], PopupMenu[Dynamic@sex, {"male", "female"}], Dynamic[current = filter[class, sex]; current[GroupBy["age"]]]}], Initialization :> {ds = ExampleData[{"Dataset", "Titanic"}]; filter[c_, s_] := ds[Select[#"class" == c \[And] #"sex" == s &]]}]. InvisibleDynamics don't do anything. – Karsten7 May 26 '16 at 14:33Dynamic. That is going to look a bit of a mess. However, if that is the way it is done. – Edmund May 26 '16 at 14:39DynamicModuleI am developing. Many thanks. (+1) Will let it sit for a bit: just in case. :-) – Edmund May 26 '16 at 14:41CompoundExpressioninsideDynamicis to use aDynamicWrapper:DynamicModule[{ds, class, sex, current}, Column[{PopupMenu[Dynamic@class, {"1st", "2nd", "3rd"}], PopupMenu[Dynamic@sex, {"male", "female"}], DynamicWrapper[ Dynamic[current[GroupBy["age"]]], current = filter[class, sex];]}], Initialization :> {ds = ExampleData[{"Dataset", "Titanic"}]; filter[c_, s_] := ds[Select[#"class" == c \[And] #"sex" == s &]]}]– Karsten7 May 26 '16 at 14:45