Xpath fails when parameter is null

Hi, My Xpath expression fails and returns runtime error when the xpath constraint parameter is null. Can you please tell me how can i overcome this behaviour.?. If the parameter value is null, can i pass any wildcard character.?   Thanks Rajesh.
2 answers

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:

[$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