Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Recommended Posts

Hi All

 

I have a sorting problem that I just cannot seem to find a solution to and have tried various ways over the last couple of days. First of all I have three tables of data:

 

1. students - with 3 fields: studentID, studentFname and studentSurname

2. timetable - with, among others, 2 fields: sessionScheduleID (foreign key for the same field in "sessionSchedule"), and studentID (foreign key for the same field in "students")

3. sessionSchedule - with, among others, 2 fields: sessionDate and sessionScheduleID

 

I am then creating two layouts, one showing the data from sessionSchedule, sorted by sessionDate in descending order, and a second with a portal showing data from "timetable" displaying a list of attending students that are related to the sessionSchedule table by studentID. All of the above makes sense and works fine.

 

However, in order to make this list more user friendly, I have added the studentSurname field within the portal in order to display the list of attendees in alphabetical order. But I am really struggling with how this can be achieved automatically, without having to sort the layout manually by surname every time the layout is opened. I've tried scripts for the event "OnLayoutEnter" for the layout that contains the portal with the script "Sort Records by Field [Ascending; students::studentSurname]" but that's not working.

 

Has anyone got any pointers on what I can try next? What am I doing wrong?

 

Thanks in advance!

Daniel

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use