SharePoint, Approve Selected List Items

SharePoint provides Out of the box JavaScript Libraries.

The List Views functions are described in the post with an example how to apply some of the functions

CountSelectedItems(ctx); return count of selected items in view

SelectRowByIndex(ctx,1,true); selects first item in list view

DeselectAllItems(ctx, tab.rows, false);deselects all items in view

SelectRibbonTab(“Ribbon.ListItem”,true); displays the listitem ribbon

The code below can be copied into a script editor web part on a list view page.

I created a list “Test Approve Items” with columns “Status”, and “Title” with 4 list items.

ListViewOperations.JPG

When “Select All” button is clicked, all items in the list view get selected.

When “Deselect All” is clicked, all items in the list view get deselected.

When “Show Ribbon” is clicked, the ribbon is shown

ribbon.JPG

When “Set Approve” is clicked after selected some items, the status changes to “Approve”.

 

 

Advertisements

2 thoughts on “SharePoint, Approve Selected List Items

  1. Hi there, can you provide some advice here.
    When I copy-paste your code in the Script Editor, I don’t get buttons but Text fields instead. The javascript code also doesn’t work for me.
    Any troubleshooting ideas?

    Like

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