Is your parameter an object or a variable? How is it used in the xpath?
It is possible to use empty values in an xpath. I do this a lot. That’s why I am wondering how you use it.
The Parameter in xpath expression is a variable.
Here is the xpath expression:
[ENABLED_FLAG = 'Y']
[$Parameter_Company != empty and contains(SEGMENT1,$Parameter_Company)]
But it failed with below message:
InternalXPathTextGetRequest (depth = 0): //Fusion.GL_CODE_COMBINATIONS[ENABLED_FLAG = 'Y'] [NULL != empty and contains(SEGMENT1,NULL)]
Caused by: java.lang.RuntimeException: Unknown predicate function expression type of second parameter: NULL
Hello
To handle null parameters in your XPath expression, use a conditional check like this
//Entity[Attribute = if ($parameter) then $parameter else '*']
This way, you avoid runtime errors and can provide a default or wildcard value when the parameter is null.
Yo can check https://forum.mendix.com/p/questions/Mulesoft Certification
Thank you.