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

Trying to concatenate values(not repeating) from collection and storing them into text.

Hello everyone, i have text value which is i split them before inserting into collection. After splitting them, i am trying to concatenate them and stored them into a text without repeating the same value

 

My text value:

CYJ_1-1592901958157.png

 

My button Function:

 

CYJ_0-1592901919280.png

 

Inside the collection,

CYJ_2-1592902178092.png

CYJ_3-1592902198350.png

 

I am trying to concatenate the values without repeating them and storing them into a text but i got the following error

 
 

concat.PNG

 
 
 
 

 

 

 

20 REPLIES 20

Hi @Rahber ,

 

Just noticed that i needed distinct value from the collection in case of duplicated value. I am still getting the duplicated value in the text despite using the distinct function.

eka24
Super User III
Super User III

Change the collection to:

Collect( Test4, { Company:Split(TextInput5_3.Text,"@").Result});
ClearCollect(Test5,Ungroup(Test4,"Company"));
ClearCollect(Test6,Distinct(Test5,Result))
 
Then In the Textbox:
Concat(Test6,Result &",")
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hello @eka24 ,

 

 

Hmmm i tried but unfortunately i am still getting duplicated value

eka24
Super User III
Super User III

I tried before sending, no duplicates. Possible you did not change the last bit:

    Concat(Test6,Result &",")
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

@eka24 ,

 

I checked in the collection itself. The test6 follow the collection of test5. I will try again then

eka24
Super User III
Super User III

See Attached

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hello @eka24 ,

 

I have tested it once again but getting duplicated value 🙁

 

The text:

TEXT.PNG

 

The button:

 

BUTTON.PNG

 

After clicking the button:

 

TEXT1.PNG

eka24
Super User III
Super User III

Revise it to:

Collect( Test4, { Company:Split(TextInput5_3.Text,",").Result});
ClearCollect(Test5,Ungroup(Test4,"Company"));
ClearCollect(Test6,Distinct(Test5,Result))
 
I was using :
Collect( Test4, { Company:Split(TextInput5_3.Text,"@").Result});
ClearCollect(Test5,Ungroup(Test4,"Company"));
ClearCollect(Test6,Distinct(Test5,Result))
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

@eka24 ,

 

Tested that too but still the same. Could it be a bug?

eka24
Super User III
Super User III

Revise it to:

ClearCollect( Test4, { Company:Split(TextInput5_3.Text,",").Result});
ClearCollect(Test5,Ungroup(Test4,"Company"));
ClearCollect(Test6,Distinct(Test5,Result))
 
or
ClearCollect( Test4, { Company:Split(Trim(TextInput5_3.Text),", ").Result});
ClearCollect(Test5,Ungroup(Test4,"Company"));
ClearCollect(Test6,Distinct(Test5,Result))
 
Then
Concat(Test6,Result &",")
 
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (25,557)