I have a canvas app with a Gallery control. Above the Gallery control is a TextInput box (TextInput1).
Names entered into the TextInput box show the search results in the gallery. Currently I am using this formula:
Office365Users.SearchUserV2({searchTerm:TextInput1.Text,top:10}).value
Now I would like to narrow down the search results by showing only users where CompanyName is "My Company Name". CompanyName is another attribute from the Office365Users connector. I don't want this to be shown on the form but hardcoded in the formula.
Can I add another searchTerm like CompanyName="My Company Name" into the formula above? What's the best way to do this?
Thanks!
Solved! Go to Solution.
Hi @greddin,
At this moment, there is no way to search users by CompanyName. SerachUser(V2) only works with following user information:
display name, given name, surname, mail, mail nickname and user principal name.
See more info here: SearchUser(V2)
But, in other hand you can filter the data by 'logged in user' company name. You can try something like below:
OnStart property of the App:
Set(userCompanyName,Office365Users.UserProfileV2(User().Email).companyName)
Items property of the Office365Users:
Filter(Office365Users.SearchUserV2({searchTerm:TextInput1.Text}).value, userCompanyName)
Hope this helps...!
Hi @greddin,
At this moment, there is no way to search users by CompanyName. SerachUser(V2) only works with following user information:
display name, given name, surname, mail, mail nickname and user principal name.
See more info here: SearchUser(V2)
But, in other hand you can filter the data by 'logged in user' company name. You can try something like below:
OnStart property of the App:
Set(userCompanyName,Office365Users.UserProfileV2(User().Email).companyName)
Items property of the Office365Users:
Filter(Office365Users.SearchUserV2({searchTerm:TextInput1.Text}).value, userCompanyName)
Hope this helps...!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.
User | Count |
---|---|
206 | |
97 | |
60 | |
51 | |
45 |
User | Count |
---|---|
258 | |
158 | |
85 | |
79 | |
58 |