Overview


Access Filters are used to restrict data based on the user running a report. A manager may only be allowed to see employee details from his or her own department, for example. Access Filters match users within Yellowfin to an arbitrary Reference Id. The Reference Id for the user can then be used as a filter when they run reports.
The steps for setting up Access Filters are:


  1. Create an Access Filter on the data source
  2. Assign the Access Filter to a field on a view
  3. Define a default Access Filter on the view
  4. Assign an Access Filter to a report

 

Configure Reference Types

Each source filter that you create needs to be categorised by a reference type. This is used to link the data in your source system with Yellowfin meta-data. It also provides a way to categorise the type of filters that you can make available for your views.

1. Click on the Configure Reference Types button at the bottom of the access filter list.

2. Type a name for your reference type and click the Add button. Alternatively, click on the x next to an existing reference type to delete it.

Note: If you wish to delete a filter type then from the edit popup select a type and click the delete link. You will be prompted to click OK to save your changes. If you delete a type which is in use this may impact your reporting filter process.

 

Create an Access Filter


1. Open the Access Filters section on the connection details page. 

2. Click the Add button in order to create a new Access Filter.

If this is the first time you have created an access filter, you may be shown this message, which provides you with some information on how access filters work.

Click on the Got it! Don't show me this again link in order to continue and not be shown this message the next time you set up an access filter.

Click Continue to create an access filter and ensure you see this message next time.

 

3. You will now need to specify which method to use when sourcing access filter records. The following options are available:

 

    • Manual - this allows you to manually provide the access filter pairings, relying on you to maintain the records manually over time. Generally this option is reserved for initial trials of access filters before moving to one of the alternative methods below.

    • Report -  this allows you to use the results of a report as the records of your access filter. You will need to have a report enabled for use in this way. 

    • SQL Query - this allows you to run an SQL query which returns the records for your access filter. 

    • CSV - this allows you to upload a CSV file to use as the records of your access filter.

 

Filter Parameters

Each Access Filter contains a list of one or more records matching a Yellowfin user to a Reference Id. These can be loaded into the system in three ways: manual entry, from a CSV file, or by running a scheduled query on the source database.

In each case you will need to enter records consisting of four fields (in this order):

Identifier TypeIdentifierFilter TypeReference ID

The Identifier Type and Identifier are used to identify a Yellowfin user.

The Identifier Type can be either

    • “Email Address”,
    • “Yellowfin Person ID”, or
    • “User ID”.

The user id related to the user id used within Yellowfin.

The Identifier field will then be the corresponding user id.

The Filter Type field is used to determine what type of filter this is. This is critical to assist users when creating views or reports. Select a user friendly type name.
To add or delete Filter Types, click the Configure Reference Types button on the Connection page.

The Reference Id field is the corresponding data for the matching user.

 

Manual Access Filters



 

Settings

Complete the settings step in order to define how the access filter records will be sourced and updated.

SettingDescription
NameProvide a name to help identify this access filter on the Connections and Task pages.
Reference Type

Provide a label to help identify this access filter's values when linking it to a field in the view.

See the Restricting Data with Access Filters#Configure Reference Types section for more information.

Refresh Type

You will have two refresh options:

  • Append: new access filter records will be added to the current list of records.
  • Overwrite: new access filter records will replace the current list of records.
Update ReminderDefine a schedule that creates a system task as a reminder to update these records periodically.

User

Search for the user you wish to assign a value to, selecting their name from the list.

Value

You will now be able to define the value to be associated with each user. You can only have one value per row, so if you want a user to have multiple values you will need to add their name multiple times.

Records

You will now be able to view all the records loaded into your Access Filter.

Usage

You will be able to see a usage count to help identify how and when your Access Filter is used.

 

Report Access Filters



 

Settings

Complete the settings step in order to define how the access filter records will be sourced and updated.

SettingDescription
NameProvide a name to help identify this access filter on the Connections and Task pages.
Select a ReportSelect a report that has been enabled as an access filter source.
Refresh Type

 

You will have two refresh options:

  • Append: new access filter records will be added to the current list of records.
  • Overwrite: new access filter records will replace the current list of records.
Refresh ScheduleDefine whether access filter records will automatically be updated based on a schedule.

Report

In order to select a report to use for access filter records, you will have to have a report saved with this setting enabled.

The report may look something like this:

Records

You will now be able to view all the records loaded into your Access Filter.

Usage

You will be able to see a usage count to help identify how and when your Access Filter is used.

 

SQL Query Access Filters



 

Settings

Complete the settings step in order to define how the access filter records will be sourced and updated.

SettingDescription
NameProvide a name to help identify this access filter on the Connections and Task pages.
Data SourceSelect a source that will be queried to return access filter records.
New User Auto RefreshDefine whether the access filter records need to be automatically refreshed every time a new user is created.
SQL QueryDefine the query used to return access filter values, in the format outlined in the Restricting Data with Access Filters#Filter Parameters section.

Once the SQL has been defined, it will need to be validated. Click the Validate button and you will either be shown errors returned from the database, or this valid message.

SettingDescription
Refresh Type

You will have two refresh options:

  • Append: new access filter records will be added to the current list of records.
  • Overwrite: new access filter records will replace the current list of records.
Refresh ScheduleDefine whether access filter records will automatically be updated based on a schedule.

 

Once complete, use the Submit button to save your access filter and load values.

 

Records

You will now be able to view all the records loaded into your Access Filter.

 

Usage

You will be able to see a usage count to help identify how and when your Access Filter is used.

 

CSV Access Filters


The file must consist of records of the four fields listed above. The file may contain a header row, which must have the titles “Identifier Type”, “Identifier”, “Reference Type” and “Reference Id”.


Settings

Complete the settings step in order to define how the access filter records will be sourced and updated.

SettingDescription
NameProvide a name to help identify this access filter on the Connections and Task pages.
FileUpload a csv file to provide values for the access filter records, in the format outlined in the Restricting Data with Access Filters#Filter Parameters section
Refresh Type

 

You will have two refresh options:

  • Append: new access filter records will be added to the current list of records.
  • Overwrite: new access filter records will replace the current list of records.
Update ReminderDefine a schedule that creates a system task as a reminder to update these records periodically.

 

Records

You will now be able to view all the records loaded into your Access Filter.

Usage

You will be able to see a usage count to help identify how and when your Access Filter is used.

 

Assign to a View


Once you have set up one or more Access Filters on a data source, you can assign them to any views created against that source.


  1. Create your view as normal, and then on the Fields page, select a field that corresponds to one of the Reference Types you have created.
  2. On the Access tab, select the correct type from the Access Filter selection. You will not be able to select Reference Types that don’t have any filter records saved against them.
  3. Once you have selected the Access Filter, save the field. You can select more than one field to be different Access Filter types if you wish.
  4. Once you have finished assigning access filter types to the fields on the view, go to the View Security page. You can select a default filter to be applied to reports created against this view here, or choose not to have one. If you select a default filter, any subsequent report created against this view will have the filter applied. Users creating reports that have the appropriate access level can change or remove the filter on a per-report basis.

Assign to a Report


When creating a report using the Drag and Drop Builder, an Access Filter can be applied if the selected View has had Access Filters defined. 


On the Report Data page, open the Report Data section in the Report Options box on the right hand side. The Access Filter selection box contains any filters that have been attached to the selected view.

If you select a filter, it will be applied to the results for each user when they run the report.

Note: The only users with the appropriate security access level will be able to change the Access Filter on a report.

Note:  You cannot take a screenshot of reports that have access filters assigned to them.
 


Overriding Access Filters

You can set it up so that certain users, such as administrators, are able to override access filters to view all results. This is done by defining an overriding code, which can then be added to a specific user’s source filter entry. Yellowfin will then not apply the access filter for such users, providing them with the full results.

Note that this type of setup to switch the access filters on or off can only be done by administrative users. The users for whom this is applied, will not be able to choose whether or not to apply the access filters themselves.


Enabling the overriding functionality

Before you can use a code to override the access filters, you will need to enable this functionality. This is done by adding the following SQL query into the configuration table in your database:

INSERT INTO Configuration VALUES (1,'SYSTEM','SOURCEFILTERWILDCARD','%');

In the above example, ‘1’ signifies the primary organization ID, and ‘%’ the override code. You can specify this code value with any character or sequence of characters to define a code. For example, ‘no_filters’.

Note: After adding this query, restart your Yellowfin instance to enable this functionality.