Field names can only be lowercase. So when you create a field called
questionNo it is automatically converted to questionno. You could also use
question_no
On Thursday, December 31, 2020 at 1:40:07 PM UTC+1 Erwan wrote:
> 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>
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/a632c678-cfc4-4f4a-b32b-f61f0a1c5cd7n%40googlegroups.com.