cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Thomas
Level 8

Join values from Excel Table column (without foreach)

I´d like to join the recipients from an Excel Sheet and add them as email receiver.

 

When I select column "Recipients" from my Excel table, I get a "you cannot use a foreach function in another foreach". That´s right, but it also prevents me from putting a join() around it. And I´m not able to see the code behind the "Recipients".

 

After selecting the Expression-tab, I only see "List of Elements" and "value". "Recipients" disappeard.

I tried both in different ways, but it always gave me null as result.

 

join(body('Recipients_retrieve')?['Recipients'], ';')

join(body('Recipients_retrieve')?['value']?['Recipients'], ';'

Using a foreach creates an item() out of body('Recipients_retrieve')?['Recipients'].

Then it is possible to call item()?['Recipients']. But that is not what I want. I´d like to have all Recipients semicolon seperated at once.

 

Got it on german, only. "Empfänger" means "Recipients".

Flow Recipient.png

 

Background:

Each entry in a different table contains a birthdate from my collegues. It checks if it is today and sends me an email with him/her. Now I wanted to extend the Excel file with multiple recipients.

 

Is it somhow possible to join a specific column from a table? Or am I just blind Smiley Happy

 

1 ACCEPTED SOLUTION

Accepted Solutions
Thomas
Level 8

Re: Join values from Excel Table column (without foreach)

I finally found a solution, which fulfilled my needs.

But it is a bit tricky:

It is not allowed to assign a variables value to the same variable ( += ). Due to that, it is not possible to join the recipients into a single string, from within a foreach-loop.

Exept, you are using a Composition and a Variable:

 

Flow Composition.png

 

Now I get a text:

Today´s birthdays:
Peter Parker (17.08.1983)
Bruce Wayne (17.08.1964)

A little bit more complicated then needed, but it works Smiley Happy

1 REPLY 1
Thomas
Level 8

Re: Join values from Excel Table column (without foreach)

I finally found a solution, which fulfilled my needs.

But it is a bit tricky:

It is not allowed to assign a variables value to the same variable ( += ). Due to that, it is not possible to join the recipients into a single string, from within a foreach-loop.

Exept, you are using a Composition and a Variable:

 

Flow Composition.png

 

Now I get a text:

Today´s birthdays:
Peter Parker (17.08.1983)
Bruce Wayne (17.08.1964)

A little bit more complicated then needed, but it works Smiley Happy

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 53 members 4,706 guests
Please welcome our newest community members: