web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Default selected items...
Power Apps
Answered

Default selected items Concat as Text with comma separated

(1) ShareShare
ReportReport
Posted on by 537

Hello, i have a problem that i am struggling with.

 

I have a Combobox in my App: 

Items:

Filter(Office365Users.SearchUser({searchTerm:ProjectCoreTeam_input.SearchText}),AccountEnabled=true,Not(IsBlank(Mail)),Not(IsBlank(Department)),Not(IsBlank(JobTitle)))

DefaultselectedItems

If(
 varItem.ReqTyp = "Request",varItem.Members,
 ForAll(Filter(Split(varItem.ProjectCoreTeam,";"),!IsBlank(Result)),
 First(Office365Users.SearchUserV2({searchTerm:Result,top:1}).value)
 )
)

this works fine!

 

However i am now trying to Patch it to my SPO List.

The Multi person field is being patched like this and works fine:

ForAll(ProjectCoreTeam_input.SelectedItems,
 Collect(Peoples,
 {
 '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
 Claims: "i:0#.f|membership|" & Lower(First(Office365Users.SearchUser({searchTerm:ThisRecord.DisplayName}).Mail).Mail),
 Department: "",
 DisplayName: ThisRecord.DisplayName,
 Email: ThisRecord.Mail,
 JobTitle: "",
 Picture: ""
 }
 )
);

 

i am now trying to also patch a single line of text field with the info of the Member Emails. but just the emails comma separated.

Concat(ProjectCoreTeam_input.SelectedItems.Mail,Concatenate(Text(Mail),";"))

This works if i select all items fresh without any default item selected. Not with default items already in the combobox.

 

How can i achieve this?

 

BR Niklas

Categories:
I have the same question (0)
  • Verified answer
    niklasjegg Profile Picture
    537 on at

    i have tried this with a text label now and i am getting email addresses separated by comma

    Concat(Filter(Peoples,!IsBlank(Mail)),Lower(First(Office365Users.SearchUser({searchTerm:ThisRecord.DisplayName}).Mail).Mail) & ";")

    why is this always such a rocked science thing. recently the way to collect a person was also changed....

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at
    Concat(Peoples, Email & ";"))

     

    You could use something like this as you already have a collection to iterate over?

  • niklasjegg Profile Picture
    537 on at

    Hi @iAm_ManCat  i wish i could.

    have tried it tho. Either i am getting x amount of ";" in the label depends on the number of Items. or if i use

     

    Concat(Peoples,Mail &";")

     

     i am getting "builtinicon:Mail".
    with 

     

    Concat(Peoples,Email & ";") 

     

    i am getting ";;;;;;;;" in the text box

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Ok, so first of all Mail (with capital m) is a protected word in the Studio - you can't just use that directly as its the mail icon, so thats why it puts in builtinicon:Mail - this is part of the reason why they created a second version of the SearchUser function, SearchUserV2

     

    I see you are using the older SearchUser and not SearchUserV2, which uses the lowercase mail that doesn't conflict with the Mail icon protected word - have you tried using the V2 function?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard