Voila!! it works. For the Team lead one. If I try to then take the formula down to the next combobox in the series for the Assistant Manager it gives an error.
Here, I have the 4 combo boxes in order.
(Combo Box) ---DataCardValue3
(Combo Box) --- DataCardValue21
(Combo Box) --- DataCardValue 28
(Combo Box) --- DataCardValue13
The only way I can figure it out is I input the [Office365Users.Manager(DataCardValue3.Selected.Email).DisplayName] into the Team Lead Combo Box and it filled in the Team Lead, NOT the Employee Manager.
So I figured I would need to input [Office365Users.Manager(DataCardValue21.Selected.Email).DisplayName] into the DefaultSelectedItems spot of the Assistant Manager to then get the Assistant Manager of the Team lead.
But I get an error stating " The Method 'Manager' has an invalid value for parameter 'userID'" WHich I think means it is not seeing the Team lead name now to pull the Assistant manager?
I found a thread that contains a formula that helps with the error,
This makes it so there is no error, however, it does not populate a name into the Assistant Manager Field still. I am still going through and researching to find a fix.
I am going to try this. I really want to learn powerapps more, we previously used InfoPath in our work but it is becoming obselete so trying to teach myself PowerApps...
So, where do I set the variable exactly? on the Employee OnChange? or on each of them individually?
Right now, on the OnChange for Team Lead - DataCardValue21, I have Set(TeamLead,DataCardValue21.Selected)
Then on the Assistant Manager Field - DataCardValue28, I have in the DefaultSelectedItems Box, [If(!IsBlank(TeamLead.Email),Office365Users.Manager(TeamLead.Email).DisplayName)]. I am getting no errors, but it is not populating anything. I keep trying to look for things on this forum board and other google lists, but I am not failing... I really appreciate ALL your help with this as I am new. Thank you thank you.
Set(EmployeeEmail, DataCardValue3.Selected.Mail) Set(ManagerEmail, Office365Users.Manager(EmployeeEmail).Mail); Set(AssistantManagerEmail, Office365Users.Manager(ManagerEmail).Mail);
@yashag2255 you sir!!!! Are my Hero! I thought that is how you meant to do it, but I think I kept typing it in slightly wrong and it was not allowing me to set variables that way. This worked! I'd hug you if I could!
I tried pretty much all day yesterday rearranging things and couldn't get it, hopefully if I keep at it. I'll get to your skill here.
Now off to make a submit button on the bottom of my form to send an email to those 3 Managers for the employee once form is submitted. Thank you again sir!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand