If by "condition" you mean filter, then this works: \define if(filter,ifyes,ifno) <$list filter="""$filter$ +[limit[1]]""" name=act emptyMessage=<<$ifno$>>> <<$ifyes$>> </$list> \end \define ifyes() YES! \define ifno() NO!
<<if "[title[GettingStarted]] +[has[title]]" ifyes ifno>> Well, it worked once ;-) You would probably need to wrap this invocation in another macro in order to pass the tiddler name as a parameter. I always prefer core-based solutions if possible over 3rd party solutions, since core-based solutions are more likely to stand the rigors of time. -- Mark On Friday, August 10, 2018 at 11:34:04 AM UTC-7, Mohammad wrote: > > Wow! > Thank you Mark! > It works and do the job like a charm! > For action command like create tiddler I call the macro using a button! > > Much appreciated! > > Mark, one more question is it possible to have a decision making structure > like below: > > If true-this > macro-action-if-part > else > macro-action-else-part > end if > > Then the header of macro should be something like > \define dcm(cond, ifpart-action, elsepart-action) > > For checking the condition parameter to see if true or false, the setVars > widget from Tobias Beer may be useful! If not we can first check the > condition outside the macro and send the result (true/false) to it. > > > Cheers > 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/6d3e7f8f-cd67-4ccc-b876-bfdac04b0da4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

