Issue with promoting Date field to MOSS Form Library - InfoPath Dev
in

InfoPath Dev

Issue with promoting Date field to MOSS Form Library

Last post 12-23-2008 07:35 AM by jeley. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-22-2008 11:26 AM

    • jeley
    • Not Ranked
      Male
    • Joined on 12-22-2008
    • Tempe, AZ
    • Posts 2

    Issue with promoting Date field to MOSS Form Library

    I have an infopath form that has a Date (DateFrom) only field that when I publish the form to the form library and promote the field MOSS decides to store this field as DateTime. I have a workflow that uses that date field and I need it to be Date only...it appears in the workflow as 12/22/2008 12:00:00. I have checked the actual XML value that is being stored in the form and it is indeed in Date only format...so either MOSS is deciding to send that value to the workflow as DateTime or the workflow engine only uses DateTime and is making that format change...either way I need it to be used by the workflow as Date only...does anyone know of any tricks to either change the Form Library's data type for that field, or force the workflow to do this?
  • 12-22-2008 07:28 PM In reply to

    Re: Issue with promoting Date field to MOSS Form Library

    Hi,

    To my knowledge, in MOSS Date type is not there. Date and Time type is available for us. So any Date field in form to be converted as Date and Time type.

    Swathip
    www.ggktech.com
  • 12-23-2008 07:35 AM In reply to

    • jeley
    • Not Ranked
      Male
    • Joined on 12-22-2008
    • Tempe, AZ
    • Posts 2

    Re: Issue with promoting Date field to MOSS Form Library

    Here is what I discovered and the work around.

    Yes, MOSS only has Date and Time data type, even though you can format that field as Date Only, it is essentially only a format of a Date and Time value. When working with MOSS Workflows based upon values in a MOSS Form Library, you are working off values in the Form Content Type, not values actually stored in the XML of the InfoPath form. Also there is no "out of the box" way to format Date and Time values in MOSS workflows using the SharePoint designer. If I wanted to start writing code again, I could install VS.NET and write a custom workflow, but I don't have the time for such things.

     Essentially what I ended up doing is creating a new text data element (strDateFrom) in the form that stores a copy of the value in the Date field (DateFrom) in the same form. This new field is updated anytime the DateFrom field is updated in the form. I then promote both the DateFrom and the strDateFrom fields to MOSS and then use the strDateFrom value in my workflow.

     Kind of a "hacky" work around, but it works.

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