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 Automate / Combine two Planner de...
Power Automate
Unanswered

Combine two Planner descriptions by grouping the different information without copying twice what is similar

(0) ShareShare
ReportReport
Posted on by 17

Hello,
I am using PowerAutomate to generate a workflow, I send a task to two services at the same time they both have to fill in a part of the description. I have created a code to wait for both services to validate the task before sending it back to me. However problem, I would like to get a combination of the two descriptions with the information from both services without duplicating it but I don't know how to do it. Is there a function to concatenate information? And to concatenate only the ones that are different?
I don't know if what I want to achieve is clear.

 

Thanks in advance

 

Categories:
  • Tteixeira Profile Picture
    Microsoft Employee on at

    Hi,

     

    Hope everything is fine.

     

    I was testing some stuff and I believe you can achieve this by using a condition and an append to string action.

     

    teixeira_0-1643019730877.png

     

    Here, after waiting for Service 1 and Service 2 to complete, I initialized an empty variable to use after comparing the outputs from Service1 with Service2. If they are the same, then I just append one of them, if they are different, then I append both.

     

    You can also use the string function Concat. 

    Concat and Concatenate functions in Power Apps - Power Apps | Microsoft Docs

     

     

     

    If this post helps you with your problem, please consider marking it as Accepted solution. If you like my response, please give it a Thumbs Up 👍

     

    Have a nice day 😀

    Tiago

  • NicolasSer Profile Picture
    17 on at

    Hello Tiago,

    Thank you for your reply

    What I would like to do is copy the mix of the two and not the whole combination;

    Ex:

    Description service 1 :
    Name: Donald
    Age :

    Description service 2 :
    Name :
    Age : 56

    Desired description:
    Name : Donald
    Age : 56

    Is it possible with your proposal ?

  • Tteixeira Profile Picture
    Microsoft Employee on at

    Hi,

     

    Thanks for the clarification 😀

     

    Flow Structure (using name from service 1 and age from service 2):

    teixeira_0-1643028961740.png

    Output:

    teixeira_1-1643029023820.png

     

    Tell me if this helps! 👍

     

    Cheers,

    Tiago

  • NicolasSer Profile Picture
    17 on at

    Thanks Tiago !

    I think we're getting close to what I want, can you just expand on the "Parse JSON" and "Empty Object" part so I can see what you put in there

     

    Thank you

     

  • Tteixeira Profile Picture
    Microsoft Employee on at

    Hi!

     

    Sure. For the parse json I just used 'Generate from Sample' and pasted one sample result from the service in order to give me a schema.

    teixeira_2-1643038626058.png

     

    Sample used to generate schema:

    teixeira_3-1643038749937.png

     

    Empty object:

    teixeira_4-1643038797443.png

     

    It's empty in order to append properties after.

     

    Cheers 😀

    Tiago

     

  • NicolasSer Profile Picture
    17 on at

    Tiago, I try lots of things with your help, but I can't do it, I'm not good with power automate...

     

    I put you a simplify idea of code that I would like, if ever you can help me more, I want to get the information directly from the description of two tasks, and that it can be adapted according to the descriptions.

    NicolasSer_0-1643042487464.png

     

    I put two descriptions for the update of the task, but here it's the point, it's not working and from this comes the need

     

     

    I thank you already for your time you spend, 🙂

     

    Nicolas

     

     

  • Tteixeira Profile Picture
    Microsoft Employee on at

    Hi,

     

    No problem!

     

    But is it giving an error?

     

    I tried to replicate and it works fine

    teixeira_0-1643044486356.png

     

  • NicolasSer Profile Picture
    17 on at

    Hi Tiago,

    Yes, it works. However the output it's not what I want. This code gives me the two descriptions in a row. 

    And what I want is 

    a description including the unique information from both descriptions.
    To use the example I gave you:

     

    Description 1 :
    Name: jason
    Age :

     

    Description 2 :
    Name :
    Age : 56

     

    Desired description :
    Name : jason
    Age : 56

     

    Description not wanted :
    Name: jason
    Age : 56
    Name :
    Age : 56

     

    Regards

    Nicolas

  • Tteixeira Profile Picture
    Microsoft Employee on at

    Okay, got it!

     

    In this example, and assuming the information is provided in that structure (by row):

    Name: jason

    Age: 

     

    I've tested the following:

     

    Flow Structure:

    teixeira_0-1643107922772.png

     

    Part 1:

    teixeira_6-1643108613477.png

     

     

    Linebreak is just a dummy variable so we can get the value to split the Descriptions by row. You will see after.

    Compose: Get the linebreak value - take(first(skip(split(Variables('A'),'  '),1)),1)

    Compose task 1: Splitting the task 1 description by row - split(outputs('Get_task_details_1')?['body/description'],outputs('Compose'))

    Compose task 2: Splitting the task 2 description by row - split(outputs('Get_task_details_2')?['body/description'],outputs('Compose'))

    Outputs of compose task 1 for example (now we have an array):

    teixeira_3-1643108219211.png

    Empty string: To append final description for update.

     

    Part 2:

    teixeira_4-1643108283173.png

     

    First condition is for the name (position 0 of the array) - 

    length(outputs('Compose_task_1')[0]) > length(outputs('Compose_task_2')[0])
     
    I'm using lengths since it makes sense in this context.
     
    If condition is satisfied, append to string 
    outputs('Compose_task_1')[0]
     
    If not, then append to string:
    outputs('Compose_task_2')[0]
     
    Condition 2 is the same but with position [1] , age.
     
    Output:
    teixeira_5-1643108489449.png

     

    This should work out 😀

     

     

    If this post helps you with your problem, please consider marking it as Accepted solution. If you like my response, please give it a Thumbs Up 👍

     

    Cheers,

    Tiago

  • NicolasSer Profile Picture
    17 on at

    Hello Tiago,

     

    I've been going through what you've suggested to understand the different features and thanks to you I've almost succeeded in doing what I wanted to do!

     

    I still have one last blockage, if you can still help me...

     

    I split the description in two part, 1st part is all the description and the 2nd one is the commentary section, however all the line breaks in the parts  take the notation '\n' and thus become part of the final description... Do you know how to prevent this from happening

    NicolasSer_0-1643387768419.png

     

    This is an example of what I have in output.

     

    Thank you already for the information you gave me, it really helped me to move forward on my project!

     

    Nicolas

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard