My navigation script was working but for only one of the 4 tables that employ the same structures and layout. So I decided to DRY code it and pass parameters. It is not working. I am tempted to just make 4 navigation scripts that work instead of this one that doesn't work. But I am posting the problem here to see if it is only a grammar issue.
The script parameter is set like this:
This is the script that tells the portal to display the next, previous or 2 next up, 2 previous down, records
Let($x = Case(
GetValue ( Get(ScriptParameter );1)= "previous";-2;
GetValue ( Get(ScriptParameter );1)= "next";+2;
GetValue ( Get(ScriptParameter );1)= "previousOne";-1;
GetValue ( Get(ScriptParameter );2) & $x
As an FYI, in case it somehow interferes, below are filtering calculations for the one-row portals that are supposed to "navigate" to display another record.
It is a self joined table. Both portals are filtered in function of the value visible in editbox £::ID_£ (original table) to display either odd or even records from the TO µ£. The calculation below display only odd results in the portal.