The expression you are using in the portal filter makes no sense. This expression must evaluate to True, False or a numeric value. (Number results other than 0 or empty are True, results of zero or empty are False.)
And if the user modified a field or variable referenced in that portal filter expression, the records shown in the portal will not update to show the change in filter criteria without a bit of help.
The script step: Refresh Window Contents [ Flush cached join results ]
Can force the portal to update, but every part of your layout/found set updates so this can trigger significant delays refreshing the window in some cases.
Using fields instead of variables and including those fields as match fields in the portal relationship can eliminate the need for refresh window. It might even eliminate the need for a portal filter expression or you may need to add them in with the X operator instead of =. (It depends on your portal filter as to whether or not it can be replaced by just using match fields or not.)
Thank you for the quick reply!
If I write the expression like this:
If ( OrderLineItems|ByOrder 2::individualETAStatus = "Closed" ; True ; OrderLineItems|ByOrder 2::individualETAStatus = "Open" or OrderLineItems|ByOrder 2::individualETAStatus = "Ship" )
does it make sense?
Or is it suppose to be
If ( OrderLineItems|ByOrder 2::individualETAStatus = "Closed" ; False ; True) ?
But then how can I tell the portal to filter out only models that have never been closed before?
Your first example will return a true or false result for each possibile way that the If funciton can evaluate. You may find that a Case function is easier to work with however.
Or you could use this exrpression:
OrderLineItems|ByOrder 2::individualETAStatus = "Closed" or
OrderLineItems|ByOrder 2::individualETAStatus = "Open" or
OrderLineItems|ByOrder 2::individualETAStatus = "Ship"
and not use any If function at all
Or for that matter, you could use:
PatternCount ( "ClosedOpenShip" ; OrderLineItems|ByOrder 2::individualETAStatus )
Thanks Phil! I tried out your suggestions, and the expressions make sense to me but it does not do what my boss wants. I'm sorry, I think I am not explaining what my boss wants very well.
Say there are 3 orders of model f1m1.
If the status of all three orders are open or ship, then it will show up on the portal.
If one of the three orders has the status of "Closed" , then f1m1 will not show up on the portal.
Is it possible for the portal to filter like this?
So if any one of the records has a status of "closed", NONE of the records should show in the portal?
If that is what you want, I believe that you could use this expression:
IsEmpty ( FilterValues ( List ( OrderLineItems|ByOrder 2::individualETAStatus ) ; "Closed" ) )
Oh wow!! It worked perfectly!!! Thank you Phil!