is there an unsign event? - InfoPath Dev
in

InfoPath Dev

is there an unsign event?

Last post 06-30-2006 01:16 PM by mshukla. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 06-21-2006 07:11 PM

    is there an unsign event?

    I am trapping the onsign event and performing some actions on the form. I ned to reverse the actions when (if) the form signature is revoked or removed? Is there an event corresponding to that?
  • 06-23-2006 04:24 PM In reply to

    Re: is there an unsign event?

    You can place an OnAfterChange event handler on the signature node to have your code notified when a change (add / delete / etc) occurs. You'll have to keep track, in code, of the current signature count so that you can compare it against the change in order to know whether an add or delete occurred.

    Good luck.
  • 06-25-2006 01:13 AM In reply to

    Re: is there an unsign event?

    i tried out your suggestion Greg. But for some reason, the OnAfterChange is triggered before the signed state of the form is altered.
    I put in a
    thisXDocument.UI.Alert(thisXDocument.IsSigned.ToString());
    statement at the end of the eventhandler for OnAfterChange and the value in the messagebox is not the final value.
    e.g. when signing the form, the box pops up with a 'false' vaue and when removing the signature, it pops up a 'true' value.
  • 06-30-2006 10:04 AM In reply to

    Re: is there an unsign event?

    So are you signing the entire form or sections within the form?
  • 06-30-2006 10:27 AM In reply to

    Re: is there an unsign event?

    Entire form
  • 06-30-2006 12:21 PM In reply to

    Re: is there an unsign event?

    Hi Shukla,
    Here is how you can find out
    In the OnAfterChangeEvent, get the signeddatablock and look for the count of signatutes on the block. This will tell you if the form is signed or unsigned.

    SignedDataBlock signedDataBlock = thisXDocument.SignedDataBlocks[0];
    signedDataBlock.Signatures.Count;
    this will give you the number of signatures on the given block.

    I hope this helps!
  • 06-30-2006 01:16 PM In reply to

    Re: is there an unsign event?

    I did and that's the interesting thing. When the OnAfterChangeEvent id generated (on the user doing a remove sign action), the form is still signed.
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.