An issue with $DisplayExpression

Here is my $Edict action code:

	{$DisplayExpression=$Name + " ๐Ÿ“•" + " [" + $ChildCount + "]"};
	{$DisplayExpression=$Name + " ๐Ÿ“™" + " [" + $ChildCount + "]"};
	{$DisplayExpression=$Name + " ๐Ÿ“—" + " [" + $ChildCount + "]"};

Action code seems to work because I can see the correct Display Expression in the Text Inspector.

But! I canโ€™t see the result in the outline view:


Update: It seems to partially work when the note doesnโ€™t have children, but then it just shows $Name + :closed_book: or :orange_book: or :green_book:.

Any suggestions?

$DisplayExpression is an expression โ€” a formula to be evaluated. For example, a $DisplayExpression might be:

$Name + " ๐Ÿ“•" + " [" + $ChildCount + "]"

Your edict, instead, gets the value of $Name when the edict runs, appends a symbol, and then appends the child count.

Hubert  ๐Ÿ“•  [ 0 ]

This isnโ€™t a value we can evaluate! So, Tinderbox bails out. Sometimes, it might be close enough to a valid expression that Tinderbox will return something, which is what youโ€™re sometimes seeing.

The best way to set different display expressions in an edict is this:

  1. Set up each DisplayExpression in a sample note, perhaps inside the Hints container.

  2. In your edict, set the DisplayExpression of this note to the appropriate sample noteโ€™s DisplayExpression:


Thank you very much for your kind help!