Home > InfoPath2010, SharePoint 2010 > Customize SharePoint list using InfoPath2010 form Part3

Customize SharePoint list using InfoPath2010 form Part3

Customize SharePoint list using InfoPath2010 form Part1

Customize SharePoint list using InfoPath2010 form Part2

Customize SharePoint list using InfoPath2010 form Part4

In the part 2 of this series, I have showed you how to create a display view. In this post, I will show you how to create a calculate field for multiple selection box using double eval.

1. I am adding another field in Employee list called skills which allow multiple selections. You can download an updated project here.You can download the formula in a text file here

2. Because Skills field allows multiple selections, you need to use double eval to create the calculate field.Copy eval(eval(Value, ‘concat(., “; “)’), “..”) To the Formula and replace Value with the field value

3. Republish your form and you will see the display form looks like below

4.If you like to remove the trailing ;, you need to change your formula to substring(eval(eval(Value, ‘concat(., “; “)’), “..”), 1, string-length(eval(eval(Value, ‘concat(., “; “)’), “..”)) – 2)

References:

http://www.infopathdev.com/forums/p/17505/60995.aspx

http://alecpojidaev.wordpress.com/2012/02/10/combining-two-datasources-in-xpath/

http://www.infopathdev.com/forums/t/14658.aspx

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: