Setting A (Signature) Date Field - InfoPath Dev
in

InfoPath Dev

Setting A (Signature) Date Field

Last post 09-16-2009 11:23 PM by Patrick Halstead. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-15-2009 11:19 AM

    Setting A (Signature) Date Field

    Attempting to set a field (date or text) triggered when a section was signed.  Because of web deployment, cannot use code-behind.  Can't seem to get it to work.  Any help would be greatly appreciated.  Here's what I've tried thus far:

    Approach #1: Rules.  Added a rule to the section (data source -> section name -> properties -> rules and merge tab) that if the section is signed, and the target field is blank, it would set the field equal to today().  Didn't work.

    Approach #2:  Since this form is a SharePoint template, I coded a workflow that would populate a SharePoint text field (in the document library on the item) with today's date.  However, the form won't pick this string up either, even when the field is set to text.

    Again, any direction is very much appreciated.

    [edit #2]  It appears as if the rules for sections are broken and don't even fire off.  can anyone confirm/refute?

  • 09-15-2009 10:50 PM In reply to

    Re: Setting A (Signature) Date Field

    Hi Patrick and welcome,

    1) Rules fire on change events. If the section is signed, it isn't going to change. Best practice is to condition the rule to fire on a field data change or button press event and then have the condition. Try display the values you are using in your condition in the view - so you can see what they are and debug the form. You can create a "debug" section in your view that you delete after you debug it.

    2) Saving values from the workflow to the XML is not supported by default because it can lead to XML that won't even open (due to schema validation constraints). You can enable "property demotion" (the opposite of property promotion) via the Advanced Settings (I believe), but it's not a best practice since it could create invalid XML. Use at your own risk.

    Have fun!

    Patrick Halstead
    Project Manager at Qdabra
  • 09-16-2009 05:17 AM In reply to

    Re: Setting A (Signature) Date Field

    Patrick, thanks for your insight. 

    I was hoping that at the moment the section gets signed, that a change event would fire.  Unfortunately, I haven't found this to be the case and the rules for this seciton are useless as it pertains to a signature event.

    As for the workflow, I have successfully copied values out of the XML and updated the SharePoint list item with those particular values.  What I have not succeeded in is...  directing those SP field values back into the form.  That's a goal for another battle. 

    After a full day and a half of battling this beast, I found a workaround.  In the submit options (under tools), instead of using the "Send form data to a single destination", I found that I could use custom action rules which check if these sections are signed, then set the appropriate date fields, and then submit.  The single drawback is that the date stamp will be locked into when the form is submitted rather than the actual date of the signature (in the event that it was signed on one day, and submitted on another).

    Thanks much for your help.

  • 09-16-2009 06:41 AM In reply to

    Re: Setting A (Signature) Date Field

    When You Sign section signature_Changed event is fired. You can create it by going to datasource select signatures group that you want and in programming select changed event And you can use code behind in web enabled forms.
  • 09-16-2009 11:23 PM In reply to

    Re: Setting A (Signature) Date Field

    We've had the date stamp drawback before too. Key thing is to sign and submit quickly or sign as part of submit but that requires code.

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.