Hello guys,
I have a concatenated email string and want to split it to Office 365 as a text label inside a gallery.
Input: ( ; as delimiter)
MorganFreeman@gmail.com;JonSnow@gmail.com
Output (Text Label inside gallery)
Morgan Freeman
Jon Snow
I am using this code however it does not work I think it needs to split first before going inside the office365 function
Substitute(Concat(Office365Users.SearchUser({searchTerm:ThisItem.'ADN Name'}).DisplayName,DisplayName,";"),";",Char(13))
The ThisItem.'ADN Name' is a single line of text which holds my input from SharePoint.
I'm trying to this for 3 days already, any help will be much appreciated.
@WarrenBelz Thank you very much! now it works!
Try this instead
Concat(
ForAll(
Split(
ThisItem.'ADN Name',
";"
) As aMails,
First(Office365Users.SearchUser({searchTerm: aMails.Value})).DisplayName
),
Value,
Char(10)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
Hello @WarrenBelz, appreciate your help! There is no error with your code. however, there's also no output. The emails shows when I try to output only ThisItem.'ADN Name' directly to the text label.
Hi @nagestiada ,
This should in theory work
Concat(
ForAll(
Split(
ThisItem.'ADN Name',
";"
) As aMails,
First(Office365Users.SearchUserV2({SearchTerm: aMails.Value}).value).DisplayName
),
Value,
Char(10)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2