Not sure if i follow what you wanted to achieve, but why not just query the 
items file extension?

Sent from Max's iPad

On 18/07/2012, at 3:15 PM, Web Admin <web.ad...@syd.catholic.edu.au> wrote:

> Hi all,
> 
> I'm writing a CommandUIHandler for a custom Ribbon button which retrieves the 
> currently selected items in the list and displays them in a modal dialog.
> 
> var selectedItems = SP.ListOperation.Selection.getSelectedItems();
> 
> var selectedItemIds = '';
> var selectedItemIndex;
> for (selectedItemIndex in selectedItems) {
>     selectedItemIds += '|' + selectedItems[selectedItemIndex].id;
> }
> 
> I want to try taking this a step further by only returning selected items 
> whose Name EndsWith ".doc" or ".docx". I can achieve this easily enough in C# 
> but am struggling with JavaScript and don't want to start using Regex and 
> manipulating array strings. :|
> 
> I'm not sure how (or whether it's possible) to grab the Name value at all in 
> this way?
> 
> Regards,
> 
> Paul (new email)
> 
> SharePoint Farm Admin/Developer
> Infrastructure Team
> CEO Sydney
> 
> p: (02) 9568 8461
> f: (02) 9568 8483
> e: paul.no...@syd.catholic.edu.au
> w: http://www.ceosyd.catholic.edu.au/
> _______________________________________________
> ozmoss mailing list
> ozmoss@ozmoss.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
_______________________________________________
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

Reply via email to