In one of my projects i had a form in which i am fetching data from a second list. In this second list there is a people field in which user can insert one or more people. And exactly these values should be displayed in my form. I tried a computed field, a textfield, a people field, but it only displayed the first value cause i choosed the displayname of the people field. If i select the people group it displayed everything (displayname, Userid and type).
So i googled and found this script and put it into my textfield:
eval(eval(DisplayName[ID = LookupFieldInMyForm]; 'concat(., ";")'); "..")
What does it do?
Well, in short it put each value of the people field from the second list and after each value it adds “;”. That was exactly what i needed.
If you want to use it for a listview box and you only want to extract the selected items you have to modify this part:
DisplayName[ID = LookupFieldInMyForm]
This it is reading the values.
I hope it helps you.
..:: I LIKE SHAREPOINT ::..
Microsoft officially and proudly announced the second Service Pack for Office 2010 and SharePoint 2010 a few days ago.
Included in this Update are all cumulative Updates as well as public updates after SP 1. This Service Pack 2 should remove some bugs and should improve the security and performance. It also improves working with IE 10, Windows 8
Download it from here: http://support.microsoft.com/kb/2460045/en-us
- Improved support for Internet Explorer 9.
- Recycle bin: Lets you restore a site collection or a web that was deleted.
- Remote Backup Systems (RBS) and shallow copy can decrease downtime and increase efficiency by moving pointers to databases instead of moving databases.
- You can see which folders are taking up valuable space with the improved Storage Management feature in site settings.
- Support for Microsoft SQL Server 2012.
- A more robust Search Host Distribution service that improves error recovery and performance during the search crawl.
- Adds backup and restore functionality to recover deleted site collections and webs.
On the page there is also an issue list which issues should be removed.
I didn’t installed it yet, so please do not install it on a production system before you didn’t test it on your dev and staging system.
..:: I LIKE SHAREPOINT ::..
InfoPath is a powerful tool which can be customized by using rules or custom code behind. At one of my projects it was necessary to display some additional information from a database dependent on which checkbox the user clicked / checked. Another request to this was that the form has to be browser-enabled cause it should be displayed in a SharePoint environment.
So i have 3 Checkboxes: A, B, C. And i have a section with a repeating table which is structured like this:
I use the onchange Event of each Checkbox which calls the function. Now let’s see how we can fill this repeating table with data: (more…)
Sometimes you just want to use more information like just the user id within your InfoPath form. Now you are able to use the SharePoint webservices but it is also possible to query the userinformation list in SharePoint. The result looks like this: (more…)
Expect that you will create a summary section of a repeating table. In this sample we want to get all first names of a repeating table and want to use a semicolon as delimiter. We will use a calculate value to store all this names into one field. The result looks like this: