XML Support Files - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

XML Support Files

Last post 11-14-2008 11:15 AM by brandtsmith. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-13-2008 06:47 AM

    XML Support Files

    I've used xml suport files a few times...but always with the simple data type ...basically strings...now I am trying to map a Sharepoint Contact list Date field (Secondary DS) into my external XML support files (Resource)...question is how to format the xml fle to allow me to use the formatting features of the DateTime fields?

    <?xml version="1.0" encoding="UTF-8"?>
     <AccreditationDate/> how to make this field a DateTime field in InfoPath???????????????????????????????



    Filed under: ,
  • 11-13-2008 08:11 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694


    Do want to restrict the data time field data type in xml then you have to change in .xsd as below,

    <xsd:simpleType name="dateTime" id="dateTime">

     <xsd:restriction base="xsd:dateTime">

     <xsd:whiteSpace value="collapse" fixed="true"/>



  • 11-14-2008 11:15 AM In reply to

    Thanks...I actually found out that my support file would not be picked up as document properties in Word...so-I went back and added all of those fields to the SharePoint content type and rebuilt the IP form...kind of had the same problem though with the date fields...here is a real gotcha-the Sharepoint date field comes across as simpleType...but allows dateTime formatting..but the value would not format...the value from the SharePoint list was like "11-15-2008 00:00:00"...hmmm...I tried picking off the first 10 chars...still no formatting (you got to have some formatting to use date in a Word doc!)...OK...last resort...I saw a reference that XML datetime strings need to have a "T" in between date and time...so I stuffed a "T" in there ("11-15-2008T00:00:00") and it worked!!!

     Now the SharePoint List dates can be formatted in IP and used in the DIP! Here is the xpath from the Rule: (Pulling date for a Provider from a secondary ds named Provider Contacts into my Document Properties from the Content Type))

    concat(substring(xdXDocument:GetDOM("Provider Contacts")/dfs:myFields/dfs:dataFields/dfs:Provider_Contacts/@Accreditation_Date[../@ID = xdXDocument:get-DOM()/pr:properties/p:properties/documentManagement/ns2:Provider], 1, 10), "T00:00:00")


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