Share via


SPDataStore.DeleteFilter method

Deletes a filter from a SharePoint list.

Namespace:  Microsoft.PerformancePoint.Scorecards.Store
Assembly:  Microsoft.PerformancePoint.Scorecards.Store (in Microsoft.PerformancePoint.Scorecards.Store.dll)

Syntax

'Declaration
Public Sub DeleteFilter ( _
    location As RepositoryLocation _
)
'Usage
Dim instance As SPDataStore
Dim location As RepositoryLocation

instance.DeleteFilter(location)
public void DeleteFilter(
    RepositoryLocation location
)

Parameters

Implements

IBIMonitoringStore.DeleteFilter(RepositoryLocation)

Remarks

PerformancePoint Services in SharePoint Server 2013 uses SharePoint lists as the repository for all first class objects except data sources.

Examples

The following code example shows how to delete a filter from the repository, based on the server-relative path to the object.

Before you can compile this code example, you must do the following:

  • Configure your development environment and create a C# class library project in Visual Studio. For information about configuring a development environment, see Set up a general development environment for SharePoint 2013.

  • Add the Microsoft.PerformancePoint.Scorecards.Client, Microsoft.PerformancePoint.Scorecards.ServerCommon, and Microsoft.PerformancePoint.Scorecards.Store DLLs as references to your project. For more information about PerformancePoint Services DLLs, see PerformancePoint Services DLLs Used in Development Scenarios.

  • Add the following using directives to your class.

    using Microsoft.PerformancePoint.Scorecards;
    using Microsoft.PerformancePoint.Scorecards.Store;
    
  • Create a method that defines a string variable named "relativePath" to store the server-relative path to the object. The following example path sets the object identifier to "5": /BI Center/Lists/PerformancePoint Content/5_.000.

  • Paste the following code example into the new method.

// Delete the object from the specified location.
// The RepositoryLocation constructor takes the server-relative path to the object.
SPDataStore.GlobalDataStore.DeleteFilter(new RepositoryLocation(relativePath));

See also

Reference

SPDataStore class

SPDataStore members

Microsoft.PerformancePoint.Scorecards.Store namespace