SubmitToSharePoint DateField to secondary form - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

SubmitToSharePoint DateField to secondary form

Last post 03-24-2014 08:24 AM by cmille34. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-17-2014 06:02 AM

    SubmitToSharePoint DateField to secondary form

    I followed this video (Submit part of a form to a separate SharePoint Library - October 17, 2013 Webinar):

    I have a form that I need to submit a bunch of the fields to a different form. The webinar above was exactly what I needed. I have it creating the form now by filling out the secondary data source of the other form. One of the fields it is supplying a value to on the other form is a date field though. When I look at the secondary datasource for this other form I see the "StartDate" field but it's defined as a string and I cannot change it any way. Attached is an image of what I am trying to explain:

    The SubmitToSharePoint populates the required field with the date but its in a string format so when you open the new form, the date is unresolved.

    Is it possible to populate that date field in a manner that the secondary form recognizes the date as a date value and not just a string?

    Sorry if any of this is unclear, please let me know if you have any suggestions. Thanks! -Chris
  • 03-17-2014 08:58 PM In reply to

    Re: SubmitToSharePoint DateField to secondary form

    Hi Chris,

    Since the StartDate field is from a secondary data source, you can only change it's data type at the location where you are querying this data from. Regarding the date validation, the StartDate is in an XML format which doesn't have problems on the form I am using. Would it be possible for you to attache a copy or a sample of the form you are working on? (Options > File Attachment > Add)

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 03-18-2014 05:01 AM In reply to

    Re: SubmitToSharePoint DateField to secondary form

    Sure! Attached is the form I am working with. The secondary data source "New_Employee_Form" is a 'preview' XML file from another form - I looked in that file and don't see the datatype being specified anywhere. I did edit that preview file like the Youtube video showed and made sure it pointed to the actual template file in SharePoint and that worked. The destination form for sure has the DateTime type in the "StartDate" field though. The value is being sent over to the new form but in a string format instead of DateTime format. If you need anything else to help troubleshoot this please let me know. Thanks!
  • 03-24-2014 06:05 AM In reply to

    Re: SubmitToSharePoint DateField to secondary form


    On the Create NEI button, the form set's the value of the Start Date.

    The control on the view is a Date Picker, which doesn't show us the real value coming in from the secondary data source. Change that control, temporarily, to a calculated value to see the "real" (xml) value. It might contain a T or a space. Probably a T.

    Then, in your rule to set the value of Start Date, use the substring-before function to only get the values before the T or before the space. Here's an example

    Hope this helps.

    Ernesto Machado
    Qdabra® Software/
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 03-24-2014 08:24 AM In reply to

    Re: SubmitToSharePoint DateField to secondary form

    Thanks for the help! I have this working now. The biggest problem seems to be that I had a "Date" field on one form, and a DateTime on the other. Once I converted the Date to a DateTime, then added a hidden text field that used that value to convert it to text to populate the secondary form the value was recognized correctly on the other side. Thanks for pointing me in the right direction of what to look at.
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.