[tw5] $set possible bug

Greetings,

I may have discovered a bug related to the $set widget in tiddlywiki 5.2.2

The following code outputs a correct result but the syntax is incorrect (missing > on the $set statement).

<$set name=“thisColor” value=<$transclude tiddler=stateColor index={{!!Phase}}>
<$text text=<> />
</$set>

the current tiddler has field Phase set to “étude” (index from the data tiddler)

The stateColor is a data tiddler with properties like
étude: “#FF0000
révision: “#00FF00
rattrapage: “#FFC700

What do you think ?

Hi Samir

The syntax “value=<$transclude tiddler=stateColor index={{!!Phase}}>” is incorrect. It is not possible to use widgets as the value of attributes of other widgets.

Try this using this line instead:

<$set name=“thisColor” value={{{ [[stateColor]getindex{!!Phase}] }}}>

Best wishes

Jeremy