Hi everyone,
I'm trying to generate a tiddler for a question together with several tiddlers for possible answers, see simplified code below. The link between the question and the answers is done with a field 'questionNo'.
The code below is supposed to print every question followed by the answers which have the same 'questionNo'. The last part doesn't work for some reason, but I discovered that when the field name 'questionNo' is replaced with 'no' everywhere then it works correctly.
So I solved my problem but I didn't understand what's happening with this field name. I would be very grateful if somebody can explain it to me :)
Regards,
Erwan
<$button>
DEL
<$action-deletetiddler $filter="[prefix[$:/temp/game/questions/q]] [prefix[$:/temp/game/candidate-answers]]"/>
</$button>
<$button>
Generate question and answers
<$list filter="[prefix[$:/temp/game/questions/q]count[]add[1]]" variable="no">
<$action-createtiddler $basetitle="$:/temp/game/questions/q" questionNo=<<no>>/>
<$list filter="A B C D">
<$action-createtiddler $basetitle="$:/temp/game/candidate-answers" questionNo=<<no>> text=<<currentTiddler>>/>
</$list>
</$list>
</$button>
<$list filter="[prefix[$:/temp/game/questions/q]]">
question title="{{!!title}}", questionNo="{{!!questionNo}}"
<$list filter="[prefix[$:/temp/game/candidate-answers]questionNo{!!questionNo}]">
{{!!title}}
</$list>
</$list>