Using SharePoint Online and InfoPath 2013, how do I populate a text box with values from a secondary source. I found these post1 and post2 as references but still cant figure it out

I can display the filtered values in a repeating table using rules but how do I get the values onto a single text box? There are 3 values returned after applying the filter:

  • NewsCoordinatorA
  • NewsCoordinatorB
  • NewsCoordinatorC

xdMath:Eval(xdMath:Eval(xdXDocument:GetDOM("Directory")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Name/pc:Person/pc:AccountId[contains(../../../d:OtherRoles/Value, "News Coordinator")], 'concat(xdXDocument:GetDOM("Directory")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Name/pc:Person/pc:AccountId[contains(../../../d:OtherRoles/Value, "News Coordinator")], ";")'), "..")

As long as I filter the first field in the eval expression, I get the right count (i.e. 3), but no matter what I do with the expression (either filtered or not filtered), it returns the same value.

If filtered, it returns: NewsCoordinatorA, NewsCoordinatorA, NewsCoordinatorA

If unfiltered, it returns: EmployeeA, EmployeeA, EmployeeA -- it returns the value of the first item on the Directory List.

有帮助吗?

解决方案

I finally got it. The first string in concat should be the text box not the field I'm trying to string together.

Formula that works:

xdMath:Eval(xdMath:Eval(xdXDocument:GetDOM("Directory")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Name/pc:Person/pc:AccountId[contains(../../../d:OtherRoles/Value, "News Coordinator")], 'concat(., ";")'), "..")

许可以下: CC-BY-SA归因
scroll top