If you hover over the expression it will tell you to what it’s evaluating. The constraint FundKernel_ID = needs to evaluate to 1 single FundKernel_ID
The expression search for ProductRiskProfile's FundKernel_ID:first item is probably evaluating to a list of FundKernel_IDs. Because the first part of your search is evaluating to a list of ProductRiskProfiles. You probably need a :first item after the first expression.
In any case, I don’t think that’s what you’re trying to accomplish.
My rough guess on the sorting is that you could achieve it by adding a :sorted to the end of the expression. But that will do the sorting on the client side. If your search returns a lot of items (~>200) it might slow down the user’s browser.
Could you add the sort field to the data type? That way you could select it from the Sort by on the search.