Subforms : Clearing and only showing matching results in drop downs (pick lists)
I have a script that creates rows in an attendance subform when a training course is selected. So that I can add an employee to multiple courses. It works great, however there is a drop down for each course containing a list of modules - this currently shows every module for every course. I have been able to use deluge to only show modules that are related to the selected course - but this does not work in a subform for me.
My Code :
- for each subRecord in input.attendee_subform
- {
- ModuleIDs = ModuleForm [module_courselookup == subRecord.attendee_courselookup].ID.getAll();
- clear subRecord.attendee_modulelookup;
- subRecord.attendee_modulelookup:ui.add(ModuleIDs);
- }
Lines 4 and 5 do not change the attendee_modulelookup field at all.
if I use an alert to show me what is currently in the field then it returns the correct value so I know it's looking at the right field - it just doesn't alter the contents of it at all.
What am I getting wrong ?