Welcome to Office and SharePoint Pro Sign in | Join | Help
in Search

SUBSCRIBE to Windows IT Pro Magazine & SAVE 30%      FREE Email Newsletters Vista UPDATE, Windows IT Pro UPDATE & More

Hiding Custom List Items

Last post 11-16-2007, 2:38 PM by danholme. 0 replies.
Sort Posts: Previous Next
  •  11-16-2007, 2:38 PM 28880

    Hiding Custom List Items

    From the MSD2D archives
    Mauro Cardarelli
    7/5/2004

    ed: This tip provides a great, no-code way to hide items in custom lists in WSSv2 / SPS 2003. Of course, now WSS v3 and MOSS 2007 offer item-level security, which should be used to achieve this result. 

    I recently had a client pose an interesting Windows SharePoint Services question that required quick action and no custom coding. This is my (what I believe to be) clever solution.

    We're using WSS as an extranet. Some users will be accessing a specific site and will have visibility into a custom list of open issues. We want the users to see all the list items but only have update privileges on a subset. This is what we did:

    (1) Start with a SharePoint Custom List with a collection of items

    (2) After entering a new item, click on the Edit icon for that row. This should bring up the EditForm.aspx page.

    (3) Open that page in Microsoft FrontPage 2003 and save a copy, using File-Save As, under a different name (i.e. EditAdminForm.aspx). This version allows full access to list items.

    (4) Return to EditForm.aspx and open it again in FrontPage.

    (5) Click on you custom list and right click; select ‘Customize SharePoint List Form'.

    (6) For each item that you wish to hide, click on the label cell for the appropriate row. On the FrontPage nav bar, you should see a selected HTML tag (it is on the far right). Click on the closest to it. The entire row should be selected.

    (7) Click the dropdown and select ‘Edit Tag...'

    (8) In the pop-up, alter the tag to read and save. This makes that row invisible.

    (9) Repeat for each row you wish to hide.

    (10) Somewhere on the EditForm.aspx page, place a hidden object. I used a borderless, transparent textbox on the lower left. Give it the following URL: ""BLOCKED SCRIPTlocation.href='EditAdminForm.aspx'%20+%20location.search""

    The JavaScript will pass along the proper row ID. Admins will be trained to know where to look for the hidden URL and will have access to a full collection of list items. Unaware users will only see the visible list items. The SharePoint Save link works without alteration.


     


    Dan Holme
    Office & SharePoint Pro Community Leader
    MVP (Windows Server - Directory Services)
View as RSS news feed in XML
SPONSORED LINKS FEATURED LINKS

Order Your Fundamentals CD Today!Get up to speed quickly and learn how to uncover rich information management capabilities with this free SharePoint CD. IT ConnectionsDive into the new Microsoft platforms and products you implement and support with the experts from Microsoft, TechNet Magazine, Windows ITPro and industry gurus. There are 70+ sessions and interactive panels with networking opportunities. Attention User Groups & User Group Leaders...Announcing the eNews Generator—a FREE HTML e-newsletter builder for user group leaders. Build your HTML and text e-newsletters in minutes. And add Windows IT Pro & SQL Server Mag articles alongside your own message!. Get Specialized SharePoint Training!SharePoint MVPs Dan Holme, Michael Noel, and Andrew Connell share their perspective and expertise in these exclusive eLearning seminars. One Event for developers and one for IT pros. Choose the one that fits your needs! Get SQL Server 2008 at SharePoint ConnectionsDon’t miss SharePoint Connections, the premier event for Microsoft IT Professionals, in Las Vegas, November 10-13. Every attendee will receive a copy of SQL Server 2008 Standard Edition with one CAL.