Hi Mohammad
> 
> But if I directly set the emptyValue and I have used only one set widget. But 
> it does not work!!
> 
> \define nextItem(parent)
>  <$set
>  filter='[tag[$parent$]after{!!temp}]'
>  name=NewIndex
>  emptyValue='[tag[$parent$]first[]]'
>  >
>   <$action-setfield
>    $tiddler={{!!title}}
>    temp=<<NewIndex>>
>    />
> </$set>
> \end
> 
> 
> <$button actions=<<nextItem "myTag">> >Next</$button>
> 
> What is the problem? Why I have to use two set widegets?

The problem here is that the emptyValue attribute of the set widget is 
interpreted as a string, not as a filter. So, rather than getting the results 
of the filter you'll get the text of the filter itself.

Things should work if you add the triple braces filtered transcluded attribute 
syntax:

> \define nextItem(parent)
>  <$set
>  filter='[tag[$parent$]after{!!temp}]'
>  name=NewIndex
>  emptyValue={{{ [tag[$parent$]first[]] }}}
>  >
>   <$action-setfield
>    $tiddler={{!!title}}
>    temp=<<NewIndex>>
>    />
> </$set>
> \end
> 
> 
> <$button actions=<<nextItem "myTag">> >Next</$button>



The triple braces syntax can be used with any attribute: the attribute is 
assigned the first result from evaluating the filter.

Best wishes

Jeremy.

> 
> 
> /Mohammad
> -- 
> 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 post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/b4d6080c-3bcb-4d9a-a34b-421def0a6d82%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/C771BD03-6A60-4DF4-9524-A388191AD56E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to