I have a problem with the following code. Within the list-Widget the function getRPZ returns the correct value. But using this exact same function as an argument in the sort Filter Prefix doesn´t do anything. It somehow has to do something with the <<currentTiddler>> variable being differently interpreted in the two ways. I just don´t have a solution for giving the <<currentTiddler>> as a variable to the function.
What version of TiddlyWiki are you using? The latest release fixes some issues pertaining to the use of functions within filter run prefixes that sound like what you are experiencing.
It should return the list of the <<currentTiddler>>, so it doesn´t need a parameter, am I correct? This also works as expected, if I use the function on its own.
Only as soon as I add the multiply operator, something goes unexpectedly wrong.
It is a bit difficult to follow the logic of your filters due to their nested nature, and names and thus relationships that I cannot comprehend.
If the functions returned the correct value before the upgrade, it suggests that they were relying on a value of currentTiddler being overriden by the filter run prefix. So you could try using the variable ..currentTiddler instead. However, this is close to a wild guess absent greater context of what the code is supposed to do.
This suggests that the problem lies in one of the two functions that you replaced with the hardcoded numbers.