Correct way to fetch distinct values from a field in a subform

Correct way to fetch distinct values from a field in a subform

Hey there,
I followed the documentation from this url  https://help.zoho.com/portal/kb/articles/data-access-distinct#Overview but not able to resolve the issue.
Here is my code:

  1. courselistype = Courses[Branch_Name = row.Branches_Name].distinct(Course_Type);
  2. row.Course_Type:ui.add(courselistype)

Where Branch_Name is bigINT,
Course_Type is a string,
courselistype is a collection variable

Any help would be appreciated.

Thanks in advance!