diff --git a/editions/tw5.com/tiddlers/filters/syntax/Let Filter Run Prefix.tid b/editions/tw5.com/tiddlers/filters/syntax/Let Filter Run Prefix.tid index 25e091e23..28762875f 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Let Filter Run Prefix.tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Let Filter Run Prefix.tid @@ -18,7 +18,7 @@ type: text/vnd.tiddlywiki [[run|"Filter Run"]] """/> -The `:let` filter run prefix assigns the result list of a filter run to a variable which is made available to the remaining [[filter runs|Filter Run]] in the [[filter expression|Filter Expression]]. Only the first item in the result list is returned when the variable is accessed in the usual way (or an empty string if the result list is empty). The special [varlist Operator] is used to access all the items in the result list. +<<.from-version "5.3.7">> The `:let` filter run prefix assigns the result list of a filter run to a variable which is made available to the remaining [[filter runs|Filter Run]] in the [[filter expression|Filter Expression]]. Only the first item in the result list is returned when the variable is accessed in the usual way (or an empty string if the result list is empty). The special [varlist Operator] is used to access all the items in the result list. Within the filter run the [[all Operator]] with an empty parameter retrieves all the titles from the previous filter runs, instead of the usual behaviour of retieving all the titles that were passed to the filter expression. diff --git a/editions/tw5.com/tiddlers/filters/syntax/varlist Operator.tid b/editions/tw5.com/tiddlers/filters/varlist Operator.tid similarity index 61% rename from editions/tw5.com/tiddlers/filters/syntax/varlist Operator.tid rename to editions/tw5.com/tiddlers/filters/varlist Operator.tid index 1e81898c0..60176b36c 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/varlist Operator.tid +++ b/editions/tw5.com/tiddlers/filters/varlist Operator.tid @@ -9,6 +9,6 @@ tags: [[Filter Operators]] [[Selection Constructors]] title: varlist Operator type: text/vnd.tiddlywiki -The parameter specifies the name of a variable that has been assigned a list of items by a [[let filter run prefix|Let Filter Run Prefix]]. The operator retrieves all the list items stored in the variable. +<<.from-version "5.3.7">> The parameter specifies the name of a variable that has been assigned a list of items by a [[let filter run prefix|Let Filter Run Prefix]]. The operator retrieves all the list items stored in the variable. <<.operator-examples "varlist">> diff --git a/editions/tw5.com/tiddlers/widgets/LetListWidget.tid b/editions/tw5.com/tiddlers/widgets/LetListWidget.tid new file mode 100644 index 000000000..ef69f3216 --- /dev/null +++ b/editions/tw5.com/tiddlers/widgets/LetListWidget.tid @@ -0,0 +1,18 @@ +title: LetListWidget +created: 20250307212252946 +modified: 20250307212252946 +tags: Widgets +caption: letlist + +! Introduction + +<<.from-version "5.3.7">> The <<.wid letlist>> widget allows multiple variables to be set in one operation, each to the list of results from evaluating a filter. It is similar to the <<.wlink LetWidget>> widget but assigns the complete list of results to the variable instead of just the first result. + +! Content and Attributes + +The content of the <<.wid letlist>> widget is the scope for the value assigned to the variable. + +|!Attribute |!Description | +|//{attributes}// |Each attribute name specifies a variable name. The attribute value is a filter whose results are is assigned to the variable | + +Attributes are evaluated in the order they are written. Attributes with the same name are allowed. Each time a duplicate attribute is encountered, it will replace the existing value set by the earlier duplicate.