UserExpression depending on solution

Have you considered using the function(x)/Eval functionality? See for instance Material property depending on solution - #2 by Maeggis