Extract individual names from a string

Jul 27, 2012 at 5:59 AM


I am using the "Group Work Site" template that comes with the Sharepoint Designer 2010. I have a multi select control which allows to select resources from the "Resources" list and save it to "group calendar" list. The values get stored in the format Resource1;Resource2;Resource3;.....
I need to be able to get the individual resource names from this string. 

Any help will be appreciated.


Jul 27, 2012 at 8:19 PM

Use the .split() function to split the values into an array, and you can work with them from there.


Jul 30, 2012 at 10:24 AM

I am new to Sharepoint Could you please explain how can I do this. I have not come across using arrays in SPD 2010.

Jul 30, 2012 at 5:01 PM

Oh, sorry. My answer made sense for SPServices (.split() is a JavaScript function), but not in XSL.

It depends on what you need to do with the individual values. If you just want to display them nicely, use MultiSelectDisplay.


Jul 31, 2012 at 5:05 AM

I want to use the values in the string. Can I use the template for that?

Moreover, I am using a Template for the application. Its not something I've made from scratch using custom lists and all. Will the MultiSelectDisplay Template work in this? If yes, can you tell me the simplest way to put it in my application? I don't require to reuse it, so I can simply put the code somewhere.

Jul 31, 2012 at 11:43 AM

You can lust drop the template into the XSL is you need it in just one DVWP. See the docs.