Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sharepoint XPath中用于测试null的三元逻辑_Sharepoint_Xpath_Infopath_Logical Operators - Fatal编程技术网

Sharepoint XPath中用于测试null的三元逻辑

Sharepoint XPath中用于测试null的三元逻辑,sharepoint,xpath,infopath,logical-operators,Sharepoint,Xpath,Infopath,Logical Operators,在XPath1.0中,是否有方法测试求值表达式的存在性并代表它修改结果 我正在尝试实现以下伪代码: if ID is empty then 0 + 1 else ID + 1 到目前为止的实际代码: xdMath:Eval(xdMath:Max( xdXDocument:GetDOM("FetchID")/dfs:myFields/dfs:dataField‌​s/d:SharePointListItem_RW/d:ID), 'concat("(ID = "

在XPath1.0中,是否有方法测试求值表达式的存在性并代表它修改结果

我正在尝试实现以下伪代码:

if ID is empty
     then 0 + 1
     else ID + 1
到目前为止的实际代码:

xdMath:Eval(xdMath:Max(
    xdXDocument:GetDOM("FetchID")/dfs:myFields/dfs:dataField‌​s/d:SharePointListItem_RW/d:ID),
    'concat("(ID = ", (d:ID or 0) + 1,")")'
)

当列表中没有项目时,此表达式不起作用,因此
max(d:ID)
为空

通常会有一个丑陋的解决方法,比如

concat("0", ID) + 1