Copy SharePoint List Values to InfoPath Repeating Section Fields - InfoPath Dev
in

InfoPath Dev

Copy SharePoint List Values to InfoPath Repeating Section Fields

Last post 09-28-2011 03:47 AM by abrag1977. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 09-26-2011 07:56 AM

    Copy SharePoint List Values to InfoPath Repeating Section Fields

    Hi

    I am experiencing a problem when following the QDabra published guide to perform the above task.
    I am currently on page 14  "Add Rules to Repeating Section", however I have hit a brick wall trying to add the first rule: Set ID..

    The formula I have put into the value field is:

    GetDOM("ArtefactListData")/dfs:myFields/dfs:dataFields/dfs:SharePointListItem_RW[number(GetDOM("ViewOptions")/Util/fields/Count)]/ID

    The verify error I am getting is:

    Node-test expected.
    GetDOM("ArtefactListData")/dfs:myFields/dfs:dataFields/dfs:SharePointListItem_RW[number(GetDOM("ViewOptions")/Util/fields/Count)]/-->xdXDocument:GetDOM<--("ArtefactsListData")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID

    I have found a similar post on this forum regarding this and have read its content but I still cannot resolve this issue.

    Any help on this would be much appreciated

    Thanks in Advance

    Geoff

  • 09-26-2011 11:04 AM In reply to

    Re: Copy SharePoint List Values to InfoPath Repeating Section Fields

    Try:

    xdXDocument:GetDOM("ArtefactListData")/dfs:myFields/dfs:dataFields/dfs:SharePointListItem_RW[number(xdXDocument:GetDOM("ViewOptions")/Util/fields/Count)]/ID

    Hilary Stoupa

  • 09-27-2011 12:25 AM In reply to

    Re: Copy SharePoint List Values to InfoPath Repeating Section Fields

    I have tried the above and I now get this message:

    Function 'GetDOM' did not return a value, or it returned a value that cannot be converted to an XSL data type.

    If I then change ID to be the ID field of the secondary data connection I receive the original error again....

    I have attached a copy of the problamatic form if that helps?

    Thanks in Advance

  • 09-27-2011 01:55 AM In reply to

    Re: Copy SharePoint List Values to InfoPath Repeating Section Fields

    As a further note I have gone back to the documented instructions and tried to create exactly the same solution that is detailed, same fields etc and I am still getting the same errors:

     Formula=

    xdXDocument:GetDOM("Contract Customer")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[number(xdXDocument:GetDOM("ViewOptions")/Util/fields/Count)]/ID

    Error=

    Node-test expected.
    xdXDocument:GetDOM("Contract Customer")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[number(xdXDocument:GetDOM("ViewOptions")/Util/fields/Count)]/-->xdXDocument:GetDOM<--("Contract Customers")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID

    Not sure what I am doing wrong...

  • 09-27-2011 03:13 AM In reply to

    Re: Copy SharePoint List Values to InfoPath Repeating Section Fields

    Looks like there's a problem with the way you set up the formula.  Could you click the Show XPath document and see if there isn't a bunch of extra stuff before d:ID?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 09-27-2011 03:59 AM In reply to

    Re: Copy SharePoint List Values to InfoPath Repeating Section Fields

    After selecting Edit XPath the following is displayed (This is with regards to my original form):

    GetDOM("ArtefactListData")/dfs:myFields/dfs:dataFields/dfs:SharePointListItem_RW[number(GetDOM("ViewOptions")/Util/fields/Count)]/xdXDocument:GetDOM("ArtefactsListData")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID

  • 09-27-2011 05:34 AM In reply to

    Re: Copy SharePoint List Values to InfoPath Repeating Section Fields

    Looks like you need to remove the part between ] and /d:ID:

    xdXDocument:GetDOM("ArtefactListData")/dfs:myFields/dfs:dataFields/dfs:SharePointListItem_RW[number(GetDOM("ViewOptions")/Util/fields/Count)]/d:ID

     

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 09-27-2011 05:41 AM In reply to

    Re: Copy SharePoint List Values to InfoPath Repeating Section Fields

    If I remove it the formula looks like this:

    xdXDocument:GetDOM("ArtefactListData")/dfs:myFields/dfs:dataFields/dfs:SharePointListItem_RW[number(xdXDocument:GetDOM("ViewOptions")/Util/fields/Count)]/d:ID

    I now get the error message:

    Function 'GetDOM' did not return a value, or it returned a value that cannot be converted to an XSL data type.

  • 09-27-2011 05:57 AM In reply to

    Re: Copy SharePoint List Values to InfoPath Repeating Section Fields

    Are you sure you're not missing an s in "ArtefactListData" or something like that?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 09-28-2011 12:43 AM In reply to

    Re: Copy SharePoint List Values to InfoPath Repeating Section Fields

    You are correct, I have now added the "s" (School Boy Error) but I now get this:

     Formula=

    xdXDocument:GetDOM("ArtefactsListData")/dfs:myFields/dfs:dataFields/dfs:SharePointListItem_RW[number(xdXDocument:GetDOM("ViewOptions")/Util/fields/Count)]/xdXDocument:GetDOM("ArtefactsListData")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID

    Error=

    Node-test expected.
    xdXDocument:GetDOM("ArtefactsListData")/dfs:myFields/dfs:dataFields/dfs:SharePointListItem_RW[number(xdXDocument:GetDOM("ViewOptions")/Util/fields/Count)]/-->xdXDocument:GetDOM<--("ArtefactsListData")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID

    Or removing the extra bits as previously advised:

    Formula=

    xdXDocument:GetDOM("ArtefactsListData")/dfs:myFields/dfs:dataFields/dfs:SharePointListItem_RW[number(xdXDocument:GetDOM("ViewOptions")/Util/fields/Count)]/xdXDocument:GetDOM("ArtefactsListData")/d:ID

    Error=

    Node-test expected.
    xdXDocument:GetDOM("ArtefactsListData")/dfs:myFields/dfs:dataFields/dfs:SharePointListItem_RW[number(xdXDocument:GetDOM("ViewOptions")/Util/fields/Count)]/-->xdXDocument:GetDOM<--("ArtefactsListData")/d:ID

    Is there any way of entering this formula by clicking various commands in the rules as opposed to manually typing it in???

  • 09-28-2011 01:30 AM In reply to

    Re: Copy SharePoint List Values to InfoPath Repeating Section Fields

    You did not remove all of the extra bits.  The xdXDocument:GetDOM("ArtefactsListData") towards the end is the part that's causing the errors.  This is what you need:

    xdXDocument:GetDOM("ArtefactsListData")/dfs:myFields/dfs:dataFields/dfs:SharePointListItem_RW[number(xdXDocument:GetDOM("ViewOptions")/Util/fields/Count)]/d:ID

     

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 09-28-2011 03:47 AM In reply to

    Re: Copy SharePoint List Values to InfoPath Repeating Section Fields

    Stil got the same issue.....

    However I now seemed to have resolved it, I first of all typed in :

    xdXDocument:GetDOM("ArtefactsListData")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID

    I then verified the formula whic then changed to ID

    The clicked Edit XPath and added in :

    [number(xdXDocument:GetDOM("ViewOptions")/Util/fields/Count)]

    Now the complete formula looks like this:

    xdXDocument:GetDOM("ArtefactsListData")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[number(xdXDocument:GetDOM("ViewOptions")/Util/fields/Count)]/d:ID

    And finally the formula has no errors....... Thanks for all your assistance on this one finally solved....

Page 1 of 1 (12 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.