Been trying to limit the choices my comboBox has, as now having being created from a Sharepoint list People column, this comboBox has ALL people in the company, when I only need about 4 from a particular branch. The way I see it, there's two options:
1) Manually inserting the emails I need (which can be problematic, if these people leave the company...) But for that I had this code:
Items = [
{DisplayName: "Nombre de Usuario 1", Claims: "i:0#.f|membership|correo1@dominio.com"},
{DisplayName: "Nombre de Usuario 2", Claims: "i:0#.f|membership|correo2@dominio.com"},
{DisplayName: "Nombre de Usuario 3", Claims: "i:0#.f|membership|correo3@dominio.com"}
]
Then on the OnSelect of a button:
YourSharePointList.CreateForm.YourPeopleOrGroupColumn = {
DisplayName: "Nombre de Usuario 1",
Claims: "i:0#.f|membership|correo1@dominio.com"
};
YourSharePointList.CreateForm.YourPeopleOrGroupColumn = {
DisplayName: "Nombre de Usuario 2",
Claims: "i:0#.f|membership|correo2@dominio.com"
};
YourSharePointList.CreateForm.YourPeopleOrGroupColumn = {
DisplayName: "Nombre de Usuario 3",
Claims: "i:0#.f|membership|correo3@dominio.com"
};
SubmitForm(SharePointForm1)
Because if I just did the "SubmitForm(SharepointForm1)", it will not save the selected data. However, this second code gives errors, but I'm guessing it should be something like that. I want to avoid using Patch.
2) The second option would be filtering by the boss of the branch and getting his subordinates. The codes I have so far are:
Office365Users.DirectReports("boss@company.com")
Office365Users.DirectReportsV2("boss@company.com").value
The V2 just produces a blank ComboBox, while the non-V2 does give me the data I need. Problem is, it will NOT save as well into the Sharepoint list.
So, do you know the fix for any of my options or a third other that does not involve Patch command? I wondered if this approoach could be acheived by limiting by Office 365 group, as all people I need will be part of this group, but did not know how to filter it this way.