How to Filter LMS Courses Created by Current User in Frappe

Hello Frappe Community,

I’m currently working on a project using Frappe LMS and I’ve encountered an issue that I need help with. I want to set up a filter in the LMS Course list view to display only the courses created by the currently logged-in user.

Here’s what I’ve tried so far:

  1. I went to the LMS Course list view.
  2. I clicked on the filter icon in the upper right corner of the list view.
  3. I clicked on “Add Filter” and selected “Created By” from the first dropdown menu.
  4. In the second dropdown menu, I selected “Equals”. In the value field, I tried to use a dynamic value to represent the currently logged-in user. I tried using %USER%, User, and frappe.session.user, but none of these worked.

I expected that this would update the list view to show only the courses created by the currently logged-in user. However, it seems that Frappe doesn’t support the use of dynamic values in the filter fields directly through the UI.

Does anyone know how I can achieve this? Any help would be greatly appreciated!

Thank you in advance!

Hello I’m AjayRaj.

If you want to apply this filter based on the Session user then you can make some change in JSON file of it.

   "stats_filter": "{\n    \"_assign\": [\"like\", '%' + frappe.session.user + '%'] }",

It will work and if you need any other help then connect with on X at @ajayrajmahiwal