Field | Data Type | Description |
Exam Name | String | Name of the examination that the student attends. |
Student ID | Long String | Unique ID of the student within the Portal App. |
Course ID | Long String | Unique ID of the course within the Portal App. |
Marks | Integer | Total marks of the student in the particular course. |
Total Time | Integer | Time taken by the student to complete the exam. |
Field Name | Data Type | Description |
Student | Lookup | The field looks up to the Students module. |
Total Marks | Integer (Formula) | A subform aggregate field that sums up the values of the Marks field in the Student Performance subform. |
GPA | Integer (Formula) | Calculates the GPA of a student in that particular examination. |
Exam Name | String (Picklist) | List downs the examinations that are planned to be conducted for the academic year. |
Field Name | Data Type | Description |
Course | Lookup | Represents the course name and it looks up to one of the courses from the Courses module. |
Total Time | Integer | Time taken by the student to complete the exam. |
Marks | Integer | Marks of the student in the particular course. |
Grade | String (Formula) | Grading system is infused as formula and it works depending on the value in the Marks field. |
student_examMap = Map(); student_examMap.put("select_query","select id from Student_Exams where Student.Student_Code =" + student_id + " and Exam_Name=" + exam_name + " limit 1"); exam_response = invokeurl [ type :POST parameters:student_examMap.toString() connection:"crm_oauth_connection" ]; exam_id = exam_response.getJSON("data").get(0).get("id"); |
courseMap = Map(); courseMap.put("select_query","select id from Courses where Course_Code =" + course_id + " limit 1"); course_response = invokeurl [ type :POST parameters:courseMap.toString() connection:"crm_oauth_connection" ]; course_id = course_response.getJSON("data").get(0).get("id"); |
subform_examMap = Map(); subform_examMap.put("select_query","select Course, Total_Time, Marks from Student_Performance where Parent_Id.id =" + exam_id); subform_response = invokeurl [ type :POST parameters:subform_examMap.toString() connection:"crm_oauth_connection" ]; |
final_subform = List(); flag = true; if(!isBlank(subform_response)) { subform_data = subform_response.getJSON("data").toList(); if(subform_data.len() > 0) { for each data in subform_data { if(data.get("Course").get("id") == course_id) { final_subform.add({"Course":{"id":course_id},"Total_Time":time_taken,"Marks":marks}); flag = false; } else { final_subform.add(data); } } } } if(flag || isBlank(subform_response)) { final_subform.add({"Course":{"id":course_id},"Total_Time":time_taken,"Marks":marks}); } examinfo = {"Student_Performance":final_subform}; |
response = zoho.crm.updateRecord("Student_Exams",exam_id,examinfo); return "nothing"; |
Writer is a powerful online word processor, designed for collaborative work.