Extract individual names from a string

Jul 27, 2012 at 6:59 AM

Hey,

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.

Thanks.

Coordinator
Jul 27, 2012 at 9:19 PM

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

M.

Jul 30, 2012 at 11: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.

Coordinator
Jul 30, 2012 at 6: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.

M.

Jul 31, 2012 at 6: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.

Coordinator
Jul 31, 2012 at 12:43 PM

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

M.