Portal filter expressions are Boolean. The expression is evaluated for each related record and the record is allowed to be visible in the portal if the expression evaluates as True for that related record. Thus, no If or Case function is needed in your example. And it doesn't really look like you need a portal filter expression at all.
But Get ( ScriptParmeter ) only returns a value inside a script. It cannot be used in a portal filter expression.
What can be used is this Relationship for your portal:
LayoutTable::SelectedSoftwareID = Software::_KP_Software_ID
Where you use the name of the table occurrence for the layout where you put your portal in place of "layout table". To select for different Software, put different values in the SelectedSoftwareID field. This can be by script or a value list.
Thanks Phil, I will give it a good run. Wish I could keep this fresh in my mind and not make these relationship mistakes. Part of learning and doing.
I was using a Primary Key from the Software Table = Foreign Key from the Portal Table which carries the upgrade licenses.
I have changed the relationship:
So, each new record I make in the Software Table, like photoshop will have the portal in it where I add the keys for the software as the software is upgraded. The new software doesn't come all that often so I don't think I need value lists or scripts to keep track of software names. I'll just make a new Software record. But the portal Table will carry records of the Keys or license keys to the upgrades.
With the above relationship change I now get one record accepted into the portal, the 2nd upgrade record as I click out of the Portal gives me the dialogue box which says that "the Portal record needs to have its unique ID, do you want to have it made in another layout? Revert the Record?" This obviously means I have another problem, I am struggling to figure it out.
You won't need to answer the above, I figured out the relationships I needed and now the solution works well.
I had to make a join table to get it going.
Thanks for being available.