cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

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 🙂

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver I
Resolver I

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 🙂

View solution in original post

1 REPLY 1
Highlighted
Resolver I
Resolver I

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 🙂

View solution in original post

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (5,527)