Secondary datafields - InfoPath Dev
in

InfoPath Dev

Secondary datafields

Last post 05-26-2006 06:15 AM by Adub21. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-18-2006 01:37 PM

    • JCH
    • Not Ranked
    • Joined on 04-18-2006
    • USA
    • Posts 6

    Secondary datafields

    I have a form that contains a repeating table that is populated from a secondary data source (webservice) when the form is opened. When I publish the form to a Sharepoint Document Library I do not have the option of making the secondary datafields available as column names on the SharePoint site. I would like to have the fields available to users so that they can create views that sort based on these datafields. Any suggestions?
  • 04-18-2006 03:13 PM In reply to

    Hi JCH,

    Unfortunately you cannot promote nodes from the secondary data source to columns in SharePoint. The reason for this is because the secondary data is not stored along with the XML of the form so SharePoint has no idea what it is. The only option I know of to do this is to copy the data from the secondary data source to a node in the Main DOM.

    Sorry to disappoint you, please let us know what you figure out!
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 04-19-2006 07:45 AM In reply to

    • JCH
    • Not Ranked
    • Joined on 04-18-2006
    • USA
    • Posts 6
    For some reason I'm not getting any rows when I use:

    XDocument.DOM.selectNodes("/dfs:myFields/dfs:dataFields/ns1:GetDataResponse/ns1:GetDataResult/TRData/ReqData");

    ReqData should be the repeating table and the field is "Name". I don't know if this info will help or not, but if you look at the (secondary) Data Source in the form while in design mode it cascades down like this: dataFields, ns1:GetDataResponse, GetDataResult, :TRData, (choice), TRData, ReqData, Name

    I'm pretty sure my XPath is correct...To verify it, I selected the repeating table text box in the form, right clicked to get the menu and selected Properties, clicked on Data Validation, selected Events: OnAfterChange, clicked Edit and I'm trusting that InfoPath gives you the correct XPath in the comments it inserts. Any ideas why I'm not having any luck with this?
  • 04-20-2006 05:58 AM In reply to

    • JCH
    • Not Ranked
    • Joined on 04-18-2006
    • USA
    • Posts 6
    Finally figured it out...I saw one of your How-To Tutorials which provided me the missing link. I had to use the following to get the node...
    XDocument.GetDOM("Name of your secondary data source").selectSingleNode( "/ns1:myFields/ns1:field1");
  • 05-26-2006 06:15 AM In reply to

    • Adub21
    • Not Ranked
    • Joined on 05-18-2006
    • USA
    • Posts 25
    Hello JCH.

    I had the same problem and I also got mine working the same way. I'm not very familiar to XML programming so I thought I'd ask you a question since you figured this out. I need to also take the secondary data source and connect to another datasource. The secondary data source holds an employee number. I need to take that number to go to another SQL table and populate a name field on my template. Any thoughts?
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.