Trouble Setting Multi-Select Field on User Input
Hi -
Having trouble getting a multi-select lookup field to pre-populate based on user input. Form A contains list of all Employees and the Location where they work. Form B creates new projects and includes a lookup field to Form C containing a list of project team groups and a multi-select lookup to Form A allowing the user to assign employees to the project. I'd like it so that if the user makes a certain selection for the team group (say, "New York Employees"), the multi-select field will pre-populate with all employees that meet that criteria. This code works to set the multiselect on load:
- input.team_members = FormA[Location = "New York"].ID.getAll();
But, when I try to add the If statement based on user input, the multiselect does not pre-populate:
- ref = FormC[Project_Group = "NY Team"];
- if(input.Project_Team_Group = ref.ID)
- {
- input.team_members = FormA[Location = "New York"].ID.getAll();
- }
Thanks for your help.