In this article, we will show how to display the list of users retrieved by this “Office365 Users” connector in a combo box.
When using the SearchUser function
First, here is the formula to list users using SearchUser function.
Office365Users.SearchUser()
In addition, if you want to set a default value for a combo box,
If you put the SearchUser function in the “DefaultSelectedItems” property of the combo box as well, and put the email of the user you want to default to the “searchTerm” argument, you can specify the user to be selected in the combo box.
When using the SearchUserV2 function
Here is the next expression that displays the list of users using the SerachUserV2 function.
Unlike SearchUser, it is necessary to set isSearchTermRquired to false and add “.value”.
Then, when you want to give the combo box displaying the SerachUserV2 function a default value, put in the SearchUserV2 function with “searchTerm” in the DefaultSelectedItems property, just like the SearchUser function, and the specified user will be selected.
By the way, you can put the SearchUser function in the “DefaultSelectedItems” property instead of SerachUserV2 to set the default value, though,
MyProfileV2 function cannot do this.
Extra: About Search
When both SearchUser and SearchUserV2 are displayed in the combo box, the search seems to work without setting Self.SearchText in “searchTerm”.
If you want to search not only by email but also by display name or something,
You can expand the search by putting the columns you want to search in the combo box SearchFields.
コメント