Hi all,
I have SharePoint list called Employees and it contain below field;( these field are single line text and import from datavers using power automate. )
In canvas app, there are two drop down list called, opUnit(dropdown), Approver(dropdown)
Each dropdown list
opUnit ‘Items’ →District(‘Employees’, ‘Operation Unit’
Approver ‘items’ →District(‘Employees’, ‘Approver Name’
And I want to set their default selected item based on current user.
Ex: if current user equal to Full name, then it’s related values populate in drop down lists.
I tried someway but it didn’t worked properly. Hope your support.
I need help below scenario.
I get Employees data from dataverse by using power automate. Approver Name is not a display name in office 365 account. It’s just last name and first name. But I have Approver Email address which is match to office 365 account. My question is, how to get user display name by Approver email?
Hi @ShriniA,
Okay, so it is a canvas app for Teams, right?
You mean the options display correct, however it displays nothing within the Combo Box, right?
Try to select the edit icon on the right pane of the fields, select the Result field name for the Combo Box.
Then you should modify your formula as below:
Filter(Distinct(Employees,‘Operation Unit’),Result=LookUp('KIT2.0_HR Data',Lower(currentuser)='Emailxxxx').‘Operation Unit’)
Modify your Filter() function as LookUp() function but keep the content within.
The key to this issue is that you set the Items property with a Result column table returned by Distinct() function, so you need to filter within the Result table rather than your data source.
Here is the screenshot.
items →District(‘Employees’, ‘Operation Unit’)
Dropdown list have correct items when apps play.
Hi @ShriniA,
Could you please provide some screenshots to describe your scenario?
Where do you have theses Combo Boxes and how you set the Item property of them?
Please do provide some detailed screenshots about controls or anything else makes sense.
Your query is worked but it doesn’t appear in dropdown field. I have no idea why it’s not appear in dropdown field.I checked it and get correct value.
Hi @ShriniA,
Do you want to populate the Combo Box with corresponding user if the current user has the same full name with it exists in the Full Name column?
The DefaultSelectedItems property expect table value, so you should set it as below:
Filter('Employees',User().FullName='Full Name').'Operation Unit'
Filter('Employees',User().FullName='Full Name').'Approver Name'
I got error in this formula.
I used LookUp(Employees, Lower(emailaddress) = Lower(User().Email),’Operating Unit’)
This emailaddress is column name of Employees table Email.
Hi,
If you have a drop down then you can use below formula in Default property of Operation Unit
LookUp(Employees, Lower(Email) = Lower(User().Email), 'Operating Unit')
I would suggest you to go for email
You can use User().FullName or User().Email to get the logged in user.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.