Basics of Deluge

Basics of Deluge

Hi,

I'm getting into the basics of using Deluge.
I know php and mysql and could build it from scratch but I like the Zoho Creator framework a lot and want to make it in this.

First of all I want something very simple:
I have a table (form) which is called Enrollment.
Enrollment contains a field called EnrollmentStudentID, which is added to the form by dragging the Look up field in it and relating it to Students>StudentsID.

In my Deluge scripting I have this code:
enrolledIn  =  Enrollment[EnrollmentStudentID == 430]; //this is an existing record in Students. It will be replaced by student.StudentID later on this is just for testing.
for each enroll in enrolledIn {
%><%=enroll.EnrollmentCourseID%>,
<% } %>

I get nothing printed.

When I write:
enrolledIn = Enrollment[EnrollmentID != 0];
for each enroll in enrolledIn {
%><%=enroll.EnrollmentCourseID%>,
<% } %>

You would expect to get the result: 377,377 (the CourseID which are in the only 2 existing Enrollment records)
Instead I get:  2671651000000013171,2671651000000013171,

Can someone tell my why?