# Changing default display behaviour for Dataset

I have a function (whose code is in this site) to display Dataset in a more convenient way. To the extent that I never use the default one. I find myself constantly writing a code with a double entry:

allReportsWithDesc =
Query[Select[StringMatchQ[#Label, "[D0" ~~ ___] &], {"Label",
"Description"}]@dsNodes;
DisplayDatasetLive[allReportsWithDesc]


That is I suppress default output then use an alternative output.

I could write:

allReportsWithDesc =
Query[Select[StringMatchQ[#Label, "[D0" ~~ ___] &], {"Label",
"Description"}]@dsNodes;%//DisplayDatasetLive


I am wondering, however, if there was not a way to change the default display for Dataset to use DisplayDatasetLive. So I could write simply:

allReportsWithDesc =
Query[Select[StringMatchQ[#Label, "[D0" ~~ ___] &], {"Label",
"Description"}]@dsNodes


and the display would use DisplayDatasetLive (or some other function for that matter).

• Look up $Post. – J. M. is away Mar 9 '16 at 11:35 • That's a useful functionality to know. So:$Post = If[Head[#] === Dataset, DisplayDatasetLive[#]] &; works like a charm. Thanks. – Trad Dog Mar 9 '16 at 11:44
• You will want to actually use If[Head[#] === Dataset, DisplayDatasetLive[#], #] & so that other outputs are not affected. – J. M. is away Mar 9 '16 at 11:48
• Yes, that's correct. Thanks – Trad Dog Mar 9 '16 at 11:50