Add a repeating Electronic Signature template part - Mel Balsamo
in

InfoPath Dev

This Blog

Syndication

Mel Balsamo

Add a repeating Electronic Signature template part

Qdabra’s Electronic Signature template part allows you to add signature images into your InfoPath solutions. This blog post describes Qdabra’s Electronic Signature template part in full detail. If you have not learned about this XTP, please read that blog post before continuing.

There may be times when we want multiple users to electronically sign a single InfoPath form, hence making the template part section repeating. This blog post details the steps on how to create a sample InfoPath form with a repeating Electronic Signature template part.

1. Design a new, blank InfoPath form template.

2. In your Data Source taskpane, add a repeating group called RepeatingES and drag it onto your view.

3. Place your cursor inside the RepeatingES repeating section.

4. Switch over to your Controls task pane and select your Electronic Signature template part.

Your form template should look similar to this: 

5. Modify your Validate check box rules.

a. Double-click on the Validate check box to open its properties, and then click Rules.

b. Modify the Valid rule’s condition:

i. In the Rules dialog box, select Valid and click Modify

ii. In the Valid rule dialog, click Set Condition

iii. In the Condition dialog’s first drop down box, select “The expression”. 

iv. Paste the following custom XPath inside the text box:

../my:UserInfo/my:PIN = xdXDocument:GetDOM("PIN List_ElectronicSignature")/dfs:myFields/dfs:dataFields/dfs:Pin_List/@PIN[../@Title = current()/../my:UserInfo/my:UserName] 

v. Click OK twice to return to the Rules dialog.

c. Modify the Invalid rule’s conditions:

i. In the Rules dialog box, select Invalid and click Modify

ii. In the Invalid rule dialog, click Set Condition

iii. In the Condition dialog’s first drop down box, select “The expression”. 

iv. Paste the following custom XPath inside the text box:

../my:UserInfo/my:PIN != xdXDocument:GetDOM("PIN List_ElectronicSignature")/dfs:myFields/dfs:dataFields/dfs:Pin_List/@PIN[../@Title = current()/../my:UserInfo/my:UserName]

v. Change the second condition’s first drop down value to “The expression” and paste the following custom XPath:

../my:UserInfo/my:UserName != xdXDocument:GetDOM("PIN List_ElectronicSignature")/dfs:myFields/dfs:dataFields/dfs:Pin_List/@Title[../@PIN = current()/../my:UserInfo/my:PIN]

vi. Add a third “OR” condition using the expression:

../my:UserInfo/my:UserName != xdXDocument:GetDOM("PIN List_ElectronicSignature")/dfs:myFields/dfs:dataFields/dfs:Pin_List/@Title

This new third condition is required for cases when neither the UserName nor the PIN are found in the list, otherwise no error is returned.

Your Invalid rule’s Condition dialog should look similar to this: 

vii. Click OK until all the dialogs are closed.

6. Finally, test your form template in Preview mode. 

After testing that all the validation works as expected, you can then publish your solution to your SharePoint site.

Comments

 

Hilary Stoupa said:

SharePoint data connections have changed with 2010 -  The expressions for the Validate field rule conditions will have changed:

For Valid Pin

../my:UserInfo/my:PIN = xdXDocument:GetDOM("PIN List_ElectronicSignature")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:PIN[../d:Title = current()/../my:UserInfo/my:UserName]

For Invalid Pin:

../my:UserInfo/my:PIN != xdXDocument:GetDOM("PIN List_ElectronicSignature")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:PIN[../d:Title = current()/../my:UserInfo/my:UserName]

../my:UserInfo/my:UserName != xdXDocument:GetDOM("PIN List_ElectronicSignature")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Title[../d:PIN = current()/../my:UserInfo/my:PIN]

../my:UserInfo/my:UserName != xdXDocument:GetDOM("PIN List_ElectronicSignature")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Title

May 21, 2012 5:06 PM
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.