Hi,
I am quite new with PowerApps and I hope PowerApps community can help me!
I use two Sharepoint Lists
1) Request : which aims at managing travel requests and where an applicant can add location, dates, manager, ... In that list you have notably columns applicantN, managerN
2) Applicant : where all persons and their direct manager is indicated (column 1 : applicantName and column 2 : managerName)
I want to autopulate the manager DefaultSelectedValue of the Manager Combo box corresponding to the different applicantName selected (you can select several applicants). For example when you choose applicants A and B you have managerA and managerB selected automatically in the combobox.
I finally manage to perform it with the following code in the applicantN combobox (DataCardValue2) of the sharepoint form with the following code (where managerList is created on New Form)
Set(ManagerEmail;LookUp(Applicant;applicantName.Email=DataCardValue2.Selected.Email;managerName));;
Patch(managerList;Defaults(managerList);ManagerEmail)
In that case it works well when you add several applicants, but when you remove one it does not remove the corresponding manager. For example if I have applicants A and B and I remove applicant B, I only want to have applicantManager A in the managerN combobox.
Can you help me resolving this issue? I think I have this problem because I was not able to select all applicants (I thought that SelectedItems would have resolve this issue but I was not able to use it properly).
Many thanks in advance!