在重复表里使用自动递增行号中Infopath2010与Infopath2007有点不大一样,2010版本已经删除了Position函数。不过没关系,2010一样支持行号的。

为Infopath2010重复表添加自动递增的行号

使用下面的表达式

count(../preceding-sibling::*[local-name() = "YourRepeatingGroupName"])+1

请注意,将红色字体的部分,替换为你的重复组的名称

例如我的例子是:

count(../preceding-sibling::*[local-name() = "合同产品"])+1

这里其实关键是xpath的语法,sibling是指找同级的元素,preceding是找之前的,所以preceding-silbing,就是找当前元素的所有之前的兄弟元素,理解这个,对这个表达式就能理解了

转载于:https://www.cnblogs.com/Bany/archive/2013/03/06/2945563.html

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-15
  • 2021-09-20
  • 2022-12-23
猜你喜欢
  • 2021-07-30
  • 2021-04-20
  • 2022-12-23
  • 2022-01-12
  • 2021-10-02
  • 2021-11-27
相关资源
相似解决方案