Hello all,
I have 2 dropdown and 2 textbox in my app
here is my requirements
Dropdown one will populate all Department Name
Based on selected department dropdown two will populate employees name
And based on selected employee textbox1 will display it's manager name and textbox2 will display if login user and selected employee have same manger or not.
I have above requirement and I am using office365user , before that I have done that with SQl but now I need to use office365user as a database ....so can anyone help me for that?
Solved! Go to Solution.
Hi @Viral21 ,
First dropdown 'Dropdown1' Items:
Filter(Distinct(ForAll(Office365Users.SearchUserV2().value,ThisRecord.Department),Value),!IsBlank(Result))
// Get all departments
Second dropdown 'Dropdown2' Items:
Filter(Office365Users.SearchUserV2().value,Department=Dropdown1.Selected.Result)
// Get all users in a certain department
First textinput 'TextInput1' Default:
Office365Users.ManagerV2(Dropdown2.Selected.Id).displayName
// Get manager's displayname
Second textinput 'TextInput2' Default:
If( Office365Users.ManagerV2(User().Email).displayName=TextInput1.Text,"same manager","not same manager")
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Hi @Viral21 ,
How many users do you have?
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Hi @Viral21 ,
First dropdown 'Dropdown1' Items:
Filter(Distinct(ForAll(Office365Users.SearchUserV2().value,ThisRecord.Department),Value),!IsBlank(Result))
// Get all departments
Second dropdown 'Dropdown2' Items:
Filter(Office365Users.SearchUserV2().value,Department=Dropdown1.Selected.Result)
// Get all users in a certain department
First textinput 'TextInput1' Default:
Office365Users.ManagerV2(Dropdown2.Selected.Id).displayName
// Get manager's displayname
Second textinput 'TextInput2' Default:
If( Office365Users.ManagerV2(User().Email).displayName=TextInput1.Text,"same manager","not same manager")
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Hi @Viral21 ,
This is a warning not an error.
If your dropdown works correctly, please ignore the warning.
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Hello @v-xiaochen-msft
For Employee dropdown I got error. I also tried like DWEmpName.Selectedtext.value but still not working
Hi @Viral21 ,
It's weird. It works for me.
There is a trick you can try. Add a "." or a "," after each word.
The formula will prompt you which property you can use.
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
@v-xiaochen-msft
After "." it not shown anything in my case.
while I entered "," it shown this record
So what I need to now?
Hi @Viral21 ,
So it may be caused by the region.
Please try this formula:
Filter(Distinct(ForAll(Office365Users.SearchUserV2(),ThisRecord.Department),Value),!IsBlank(Result))
Filter(Office365Users.SearchUserV2(),Department=Dropdown1.Selected.Result)
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
187 | |
53 | |
52 | |
38 | |
37 |
User | Count |
---|---|
282 | |
97 | |
86 | |
80 | |
77 |