The only way to make a portal filter "changeable" is to refer to a field or variable in your relationship and then design your layout so that it is possible to modify the value and then force the filtered portal to refresh using the new filter values.
Say you add text field: YourTable::AccountName to your layout and format it with a value list of account names. You can use this filter expression:
PortalTable::AccountName = YourTable::AccountName to only show the records in the portal with the current account name shown in the field.
This script can then force the portal to re-filter whenever you change the value in this field:
Refresh Window [Flush cached join results]
A script trigger can run this script whenever a new value is entere/selected in YourTable::AccountName.
I have a global field in the Accounts table called FILTER to store any filtering data. If I wanted to show all records without any filter, what would be the calculation I should use? I tried to create a case filter but it didn't work....
A Case Filter can work, but an Or operator is all you really need here.
( Accounts::GlobalField = "All" ) OR ( Accounts::GlobalField = Accounts::AccountName )
Put "All" in the global field and you'll see all the accounts. You could also replace the term to the left of Or with IsEmpty(Accounts::GlobalField) if you want to show all accounts when the global field is empty.