cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

Concat function show many semicolons

Hi, 

I just have a ComoboBox to select Multiple items from a ComboBox

created collection to add selected Items from ComboBox,

when I try to assign to label that collection value

CollectionValues.Mail then it shows DataType: DataTable like an expected Text value

Then I tryed

Concat (CollectionValues, Mail&"; ")

but it shows below OutPut and it surprised me 

I selected only one item from the drop-down but it shows many semicolons along with the selected name.

 

 

muralikrishna12_0-1609962013939.png

 

how can I remove semicolons and get only selected items?

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@muralikrishna12 

So, your SearchUser function is going to return a table.  You are collecting all of those results.

I assume your Gallery1 TeamsUsers value is a list of just display names (i.e. not email addresses) and you are trying to get the email address for those names.

If so, consider the following change to your formula:

If(!IsBlank(Gallery.Selected.TeamsUsers), 
    ClearCollect(CollectionValues, 
        Filter(
            ForAll(Split(Gallery1.Selected.TeamUsers, ";"),
              {Name: Trim(Result),
               Mail: Coalesce(First(Office365Users.SearchUserV2({searchTerm:Trim(Result)}).value).Mail, Blank()) 
              }
            ),
            !IsBlank(Mail)
        )
    ) 
)

 

You will end up with a collection that has two columns, the original name and the first found email address for that name.  If no email is found, then the name is filtered out.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

3 REPLIES 3
Super User III
Super User III

@muralikrishna12 

You appear to have blank records in your collection.

Please consider changing your Formula to the following:

Concat(Filter(CollectionValues, !IsBlank(Mail)), Mail & "; ")

 

I hope this is helpful for you. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Hi @RandyHayes 

It seems like the issue is not while adding into the collection from Combobox to collection, 

Issue is 
When I edit that item/Record, that particular field values (which we have selected and updated from collection)

adding/Copying back in to collection here it is getting many semicolons along this submitted values 

here is the code 

If(!IsBlank(Gallery.Selected.TeamsUsers), 
  ForAll(Split(Gallery1.Selected.TeamUsers,";"), 
   Collect(CollectonValues, Office365Users.SearchUser({searchTerm:Result}))));

Can you help me how to avoid that semicolons 

Super User III
Super User III

@muralikrishna12 

So, your SearchUser function is going to return a table.  You are collecting all of those results.

I assume your Gallery1 TeamsUsers value is a list of just display names (i.e. not email addresses) and you are trying to get the email address for those names.

If so, consider the following change to your formula:

If(!IsBlank(Gallery.Selected.TeamsUsers), 
    ClearCollect(CollectionValues, 
        Filter(
            ForAll(Split(Gallery1.Selected.TeamUsers, ";"),
              {Name: Trim(Result),
               Mail: Coalesce(First(Office365Users.SearchUserV2({searchTerm:Trim(Result)}).value).Mail, Blank()) 
              }
            ),
            !IsBlank(Mail)
        )
    ) 
)

 

You will end up with a collection that has two columns, the original name and the first found email address for that name.  If no email is found, then the name is filtered out.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (28,319)