I'm trying to form a collection of users from the "Office 365 Users" connector dependent on their email address. The issue I'm running into is I'm not sure what the second input of my Collect() function should be. I want to be able to add the "whole user" to my collection and not just their display name, email, etc. For example the, the following code produces a collection of just the users display names.
ForAll(
Office365Users.SearchUser(),
If(
Last(Split(Mail, "@")).Result = "companyEmail.com",
Collect(users_collection, DisplayName)
)
)
The problem arises when I want to populate a gallery pulled from this collection and display more than just their name in each cell, such as an email or location. So is there any way to make a collection of the user objects themselves?