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

Avoid Duplicate values in Semi Column Delimiter

I have this flow that is running but the issue now is how to get rid of the duplicate values in my column 3;8,3,3, . I do not want it to keep repeating the id and where do i insert the logic? Below is a Screenshot. Thanks3 appears three times, i want to be able to see just one 33 appears three times, i want to be able to see just one 3my flow 1my flow 1my flow 2my flow 2

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Dual Super User
Dual Super User

Hi @Tbabe,

 

I see you added the row to the existing condition with an AND operator. The evaluation of that condition will probably always be false since appendeddataId can't be empty and contain data at the same time. 

 

newcondition.png

 

What I proposed was to add another condition action. Can you try this setup instead?

 

 

newcondition02.png

 

Btw, can you also share a screenshot of the config the Compose 3 action with the union function?

View solution in original post

10 REPLIES 10
Expiscornovus
Dual Super User
Dual Super User

Hi @Tbabe,


It looks like you have two delimiters, is that correct? In the example are we evaluating two or four items?

 

If it is four items you could use some intersection, split and join functions to get the unique item values.

 

Below is an example with a couple of compose actions.

 

join(intersection(split(join(split(outputs('Compose'), ';'), ','), ','), split(join(split(outputs('Compose'), ';'), ','), ',')), ';')

 

delimiter.pngdelimitertestresult.png

Thank you for your response, so the project is to append the Id( column) from a sharepointlist (target list) to another column (destination list) . which that is working fine but just need it to be perfect by not repeating same id's when it is rerun. so i tried this and i got the following errors. Screen Shot 2022-01-07 at 7.31.20 AM.png

Expiscornovus
Dual Super User
Dual Super User

Hi @Tbabe,

 

Thanks for the clarification. My example was to clean it up afterwards.

 

If you want to prevent the flow appending an existing id in that string value it probably is easier to use an indexOf function in an expression to search if the id already exists in the string value.

 

Can you show me the configuration of how you append the id? This way I can share a specific example for your situation.

sure... its quite lengthy,😊Screen Shot 2022-01-07 at 7.48.43 AM.pngScreen Shot 2022-01-07 at 7.51.27 AM.pngScreen Shot 2022-01-07 at 7.52.10 AM.pngScreen Shot 2022-01-07 at 7.53.49 AM.pngScreen Shot 2022-01-07 at 7.54.21 AM.pngScreen Shot 2022-01-07 at 7.54.44 AM.pngScreen Shot 2022-01-07 at 7.55.24 AM.png

Expiscornovus
Dual Super User
Dual Super User

Hi @Tbabe,

 

Thanks for sharing the screenshots.

 

You can add a nested condition action in the If No section of your Condition 3 action. In this new condition action check if the appendeddataId variable contains the documentId. If not, append. If Yes, do nothing.

 

nestedcondition_appendeddateid.png

Tbabe
Helper I
Helper I

Thanks i will try it now

Tbabe
Helper I
Helper I

Hi, I did what you asked , but got an error, I'm new to Power Automate, is there anything i should add to the flow? please find below an attachmentScreen Shot 2022-01-07 at 9.58.58 AM.pngScreen Shot 2022-01-07 at 9.59.10 AM.png

Expiscornovus
Dual Super User
Dual Super User

Hi @Tbabe,

 

I see you added the row to the existing condition with an AND operator. The evaluation of that condition will probably always be false since appendeddataId can't be empty and contain data at the same time. 

 

newcondition.png

 

What I proposed was to add another condition action. Can you try this setup instead?

 

 

newcondition02.png

 

Btw, can you also share a screenshot of the config the Compose 3 action with the union function?

Tbabe
Helper I
Helper I

 sorry the compose3 wasn't suppose to be there

Thank you it worked

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,220)