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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Help with formatting JOIN output in flow

(1) ShareShare
ReportReport
Posted on by 39
Hello! I'm looking for some help with my cloud flow running in my Dynamics Sales app.
 
I have a custom table in my Dynamics Sales application that stores event attendees lists. When a new list is uploaded, it contains information about the event and year the list is for. I have an automated cloud flow that runs to check which individuals on the list have attended a previous event, among other things. I have a text field where I'd like to capture the previous events that the individual attended. 
 
Currently I am achieving this with the following flow steps:
 
1. List rows from the table that match on the attendee email address
2. From the output, Select the Name of the event
3. Compose step with a Join function to join that list together -- join(body('Select'),';')
4. Update the row from the list that was just added with the Output in the /Previous Events/ field.
 
This works, but it is not perfect. There are two minor issues. 
 
Issue 1: I can't figure out how to change the formatting of the output. The Previous Event field looks like:
 
Issue 2: The event name for the current list is pulling in. So if the name of the list I've just uploaded and am trying to analyze is for /Event 3/, then Event 3 also appears in the Previous Events field. I'd like the List step to exclude the event list record that was just created.
I have the same question (0)
  • Leah Ju Profile Picture
    Microsoft Employee on at
    Hi  shogg,
    Could you share details about the custom table and steps of the flow?
    Maybe you can refer to this link, Format data by examples:
    And you can try to add filter rows in the 'List rows' step:
     
     
  • Suggested answer
    Amit Katariya007 Profile Picture
    10,409 Super User 2025 Season 2 on at
    Dear User,
     
    Make sure if that field has the events then it should be comma seperated. before updating the field if it has the given event name i.e. use string contains formula. then don't proceed else add that event by adding a comma before the event name.
     
    Now above solution will work if you don't have 2 events with the same initial string like "Test Event 2". Here it will return true if you are comparing the "Test Event" in the string.
     
    So for that you can convert event string into array and then do exact match.
     
    Refer below article for more information

    Thank You,
    Amit katariya 
  • shogg Profile Picture
    39 on at
    Hi Leah,
     
    Thanks for providing those links. I just tried the "format data by examples" but it appears that the output I'm getting based on the examples I've supplied is relying on knowing the expected length of the string (event name). This doesn't feel like the correct approach to me, since I'd like to account for events of varying length.
     
    if(equals(length(split(outputs('Compose'), '{')), 2), split(outputs('Compose'), '"')[1], if(equals(length(split(outputs('Compose'), '-')), 2), concat(split(outputs('Compose'), '"')[1], '; ', split(outputs('Compose'), '"')[5], '; ', split(outputs('Compose'), '"')[9], '; ', split(outputs('Compose'), '"')[13]), concat(split(outputs('Compose'), '"')[1], '; ', split(outputs('Compose'), '"')[5], '; ', split(outputs('Compose'), '"')[9])))
     
    Here's more information about the table and the steps of the flow. 
     
    The table itself is called "Event Lists" and serves as a database of event lists. The "Name" column is used to name the event. Then there are columns for basic information about attendees, such as First Name, Last Name, Email, and Company. For example, when I receive an Excel spreadsheet that has the list of attendees for Event A 2024, I import that list into this table. Every row in that list is named Event A 2024 and there is 1 row per attendee. This same table stores information from past events, such as Event A 2023, Event A 2022, and so on.
     
    When I import the list, I want to analyze the list to see what previous events the individuals have attended and list them out in a field called Previous Events, so when I am looking at the Event A 2024 list I can see who attends events regularly and who is a first-time attendee. The flow is as follows:


    Look to see if that individual's email appears on a previous event list in the table.

     
    Select the Name(s) of the matching events. Could be one or more, depending on what previous events were attended.

     
    Join those event names together, separated by semi-colon

    (Details of the Join expression)

    Update the record that was added (and triggered the flow) with the list of previous events the individual attended.


    I appreciate any advice you can provide. Thank you!

  • Suggested answer
    Leah Ju Profile Picture
    Microsoft Employee on at
    Hi shogg,
    Maybe we keep it simple and handle it this way:
    1. At the 'List rows' step, filter out the row that was just created.
    2.Update fields:
    -- In order not to overwrite the previous value, you can operate like this:
    Result:

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans