Mapping XSD time field to SharePoint DateTime (format=timeonly) - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Mapping XSD time field to SharePoint DateTime (format=timeonly)

Last post 08-23-2012 08:44 PM by aqibarain. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 08-15-2012 08:19 PM

    Mapping XSD time field to SharePoint DateTime (format=timeonly)

    Hi,

    I have got this Infopath time field which I'm trying to map with SharePoint DateTime field (Format=Timeonly). the form does get submitted to library but the SharePoint Time Field is empty and when I edit the sharePoint Time field in Edit Properties then it goes for exception (yellow screen).

    SharePoint DateTime field is expecting yyyy-mm-ddT00:00:00 which it then converts to Time only and infopath is sending only Time which is causing this problem.

    I did try to edit this field on form submit to submit yyyy-mm-ddT00:00:00 but like this form can not be submitted as it says time format is not correct.

     any idea??

    Thanks in advance

    Aqi

  • 08-16-2012 09:59 AM In reply to

    Re: Mapping XSD time field to SharePoint DateTime (format=timeonly)

    How have you got Sharepoint TimeOnly field?

    I manage to find only Date or Date and Time (but not TimeOnly) types of Sharepoint fields


    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 08-16-2012 02:16 PM In reply to

    Re: Mapping XSD time field to SharePoint DateTime (format=timeonly)

    Hi Gennaday, Thanks for your reply. if you create list from schema (pragmatically) then you have this option while creating Fields and you can specify the Format. Regards
  • 08-16-2012 05:57 PM In reply to

    Re: Mapping XSD time field to SharePoint DateTime (format=timeonly)

    Hi Gennaday,

    this is how I have created DateTime field in SharePoint Library Schema.

    <Field ID="{A91FE5FE-4F45-4A4F-827B-5EE9246BC405}" Type="DateTime" Name="LandingTime" DisplayName="Landing Time" Format="TimeOnly" Group="MDD" Node="//ctt:main/EndTime"></Field>

    Thanks

    Aqi

  • 08-22-2012 10:47 PM In reply to

    Re: Mapping XSD time field to SharePoint DateTime (format=timeonly)

    anyone out there to help?? Plz
  • 08-23-2012 09:48 AM In reply to

    aqibarain:

    Hi Gennaday,

    this is how I have created DateTime field in SharePoint Library Schema.

    <Field ID="{A91FE5FE-4F45-4A4F-827B-5EE9246BC405}" Type="DateTime" Name="LandingTime" DisplayName="Landing Time" Format="TimeOnly" Group="MDD" Node="//ctt:main/EndTime"></Field>

    Thanks

    Aqi

     

    Hi, Aqi,
    this is irrelevant what you create in sharepoint as soon as you use Infopath field promotion:
    promoting either creates from the scratch new field in sharepoint library with matching type or uses previous matching type

    Now, if you insert in Infopath Designer 2010:

    • Date Picker, then it does not have Time only choice in "Data type:" properties
    • Date and Time Picker, then eliminate Date part on design surface, then the second Time part is converted into Text box control
    • Text Box and choose Time in choices of "Data type:", then promote it, it is shown correctly in sharepoint library field entered through Infopath values like 23:59:00 but they cannot be edited in sharepoint

     Note that

    • when changing the promoted fields you should remove and add then add them again into promoted list of Property Promotion (in Publishing Wizard or in Form Options)
    • I do not see anywhere in sharepoint time the seconds, be it built-in or custom columns, they are just cut off



    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 08-23-2012 08:44 PM In reply to

    Re: Mapping XSD time field to SharePoint DateTime (format=timeonly)

    Hi Mate,

    Thanks very much for your reply. what you are talking about is publishing from from INfopath directly to sharepoint library. I'm deoploying through WSP and infopath form is attached to a content type. That is why I'm mapping each field with infopath XSD.

    Aqib

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