Skip to main content

Use Case: Data source for courses with ID numbers in Dash

How to filter for courses that have an official ID number assigned (Premium only)

About

This use case demonstrates how to create a data source that only includes courses containing a value in the "Course ID number" field. This is a common requirement for administrators who want to separate official, synchronized courses from sandbox or manually created courses.

To access these settings, navigate to Site administration > Plugins > Local plugins > Dash Addons > Manage data sources and select Create custom data source.


1. General settings

Establish the identity of the data source and select the primary table.

  • Data source name: Official Courses

  • ID number: official-courses

  • Select main table: course

After selecting the table, click the Generate fields button to populate the initial configuration.


2. Fields setup

Define which course details to display and ensure the system can link to them.

  • Placeholder fields: Select course:id (mnt.id) from the dropdown.

  • Field #1

    • Field: course:fullname

    • Transform the format: Link

    • Additional format value: /course/view.php?id={mnt.id}

  • Field #2

    • Field: course:idnumber

    • Transform the format: None


3. Condition setup

Apply a filter to exclude any course where the ID number field is empty.

  • Enable conditions: Checked

  • Condition #1

    • Field: course:idnumber

    • Operator: !=

    • Value: (Leave this box completely empty)

Click Save changes to finalize your data source.


How to use this data source

Once saved, add a Dash block to any page and select Official Courses from the "Build your own" section. You can then open the block preferences and enable the fields you wish to display within the Fields tab.

Did this answer your question?