1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-11 16:24:31 +00:00

Docs for apply filter run prefix

This commit is contained in:
Jeremy Ruston 2025-02-12 16:41:37 +00:00
parent 09f8ab9962
commit 49969a2f1e
2 changed files with 25 additions and 1 deletions

View File

@ -3,7 +3,7 @@ title: $:/core/modules/filterrunprefixes/apply.js
type: application/javascript
module-type: filterrunprefix
Filter run prefix to make input titles available as variables when evaluating the filter run
\*/
(function(){

View File

@ -0,0 +1,24 @@
created: 20250212154426403
from-version: 5.4.0
modified: 20250212154426403
rp-input: the filter output of all previous runs so far
rp-output: the result of evaluating the filter run
rp-purpose: make input titles available as variables when evaluating this filter run
tags: [[Named Filter Run Prefix]]
title: Apply Filter Run Prefix
type: text/vnd.tiddlywiki
<$railroad text="""
\start none
\end none
( ":apply" | - )
[[run|"Filter Run"]]
"""/>
The input titles from previous runs are made available to this run as numeric variables <<.var $1>>, <<.var $2>>, <<.var $3>> etc. The results of the filter run are the output titles.
The `:apply` filter run prefix is useful when using computed values as the parameters of operators. For example:
```
=[<first>addsuffix<s>] =[<second>addsuffix<s>] :apply[function[process],<$1>,<$2>]
```