2
votes

I have a form that allows for multiple signatures. I would like for the form to count the number of signatures and display text if under 3 signatures (as a warning).

How can this be done? I assume the solution would be some sort of VB code.

I found this post but seems to only be a boolean regarding a signature. I've also tried adding a rule on say a Button, but "Conditions" seem very limited. I could pick the signature control, but things like "is not present" or "is blank" doesn't seem to appropriately pick up if there are any signatures or not. I can't find any conditions that correctly detect signatures.

Note this is being filled out on the web. Details on my form setup:

  • InfoPath 2010 pushed to a Sharepoint site
  • Section created w/ Digital Signatures enabled for it
  • "All the signatures are independent" option is used

I did try sum() on the signature control, but it returned NaN

Per this MSDN article, I tried some VBcode but I haven't been able to get the syntax working. I've tried things like <signature_control_name>.Count

1

1 Answers

1
votes

In your data source you should have two signatures groups, one nested within the other. All signatures are stored as nodes within the inner most group as Signature nodes.

If you are using script/managed code, you should be able to grab the inner node and then do a count on the number of Signature nodes within it.

I am not sure of a way to do that using just IP rules since there is no actual node there until a signature is applied (IP won't validate the rule and let you save it).