Hi all,
I created a hierarchy of Logical Functions, with property value groups defined with PVMT.
The extension is called la.SF, and I would like to sort them in the generated document by a property value named Id, with values like LF-00-01, LF-00-02, etc.
The expression seems correct. You can test each part of the expression on one specific element to make sure. Maybe the value is not a String ? or at some point you have a collection (but with the ->first() that should not be the case). You can check the type of different parts of the expression.
The output remains the same, suggesting that the lambda expression provided to the query might not be properly evaluated. Should I consider grouping certain parts of the expression with parentheses for proper execution?
Doesn’t seem to be a String but maybe a collection… even if it should not ? I will need to debug that… But as a workaround you can use ->toString() it will convert the all collection (?) to a String:
Hi Yvan,
I’m quite confused about the behavior of the query.
I changed a bit the query using any instead of select. I got different results from M2Doc and Sirius interpreters
I think the getValue() could be the one returning a Collection instead of a String. The feature access value returns a String. So the first expression should be used or the second one with addition of ->toString() to convert the Collection to a String that can be sorted.