must have Student
(
type = picklist
values = Students.ID
displayformat = [ FullName ]
width = 206px
)
Here's the script for the Submit button:
- Submit
- (
- type = submit
- displayname = "Update"
- on click
- {
- //add student to selected group
- recStudent = Students [ID == input.Student];
- recStudent.Small_Group = input.Small_Group;
- reload;
- }
- )
I'd like to dynamically populate the list based on another field (Filter) on the form. I have the script written to do this:
- if((input.Filter == "Unassigned Students"))
- {
- studentList = Students[Small_Group is null] sort by FullName;
- }
- else if((input.Filter == "Assigned Students"))
- {
- studentList = Students[Small_Group is not null] sort by FullName;
- }
- else
- {
- studentList = Students[ID != 0] sort by FullName;
- }
- Student:ui.add(studentList.FullName.getall());
This displays correctly, but I can't figure out how to get access to the ID value so that I can save it in the data record instead of the FullName value. Is there some way to mimic the use of the displayformat property in the ui.add function?