Problem with bound names, filters and expressions
Summary: This one is mysterious, and the recipe is complex, but I've found a case where filtering is mysteriously failing.
The example is from the Arisia Space. The QL in question is:
+$job
My Profile ->
*_if(_isEmpty,
""You don't have a profile!"",
(+$profile
Application._instances ->
_filter(Who is Applying -> _is($profile)) ->
_bulleted
)
)
Obviously, this is Exploring from a Job where I have an Application outstanding.
This should result in just my Applications. It actually returns not only all Applications, it returns all Applications twice.
If the *
before the _if()
is removed, this works correctly. Which seems just plain wrong, but probably means we aren't clearing the collections flag from the context correctly.
The issue may well be in the use of the Expression in the else clause of the _if. That should be receiving exactly My Profile, and assigning that to $profile, but I suspect it is somehow bleeding into the second phrase in that Expression.