Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

How to send Power Apps Collection in Email body

Posted on by 315

Hi,

 

I have a collection which has a single column with few records(basically those records are URL's). Now I want to send that collection in email body. in SendEmailV2() function.

 

I tried using HTMLText input to parse the collection using ForAll function, but it didn't work. 


Appreciate your help!

Categories:
  • kbilakanti Profile Picture
    kbilakanti 315 on at
    Re: How to send Power Apps Collection in Email body

    @mdevaney @WarrenBelz Appreciate your inputs. It worked like a charm 🙂

  • WarrenBelz Profile Picture
    WarrenBelz 142,733 on at
    Re: How to send Power Apps Collection in Email body

    Hi @kbilakanti ,

    The HTML code below will do a five column table with bold headers

    <div>
    	<table border='1' cellspacing='0' cellpadding='0' width = '500'>
    		<tbody>
    			<tr>
    				<td width='100' height='30'><strong>&nbsp;Heading1</strong></td>
    				<td width='100'><strong>&nbsp;YourHeading2</strong></td>
    				<td width='100'><strong>&nbsp;YourHeading3</strong></td>
    				<td width='100'><strong>&nbsp;YourHeading4</strong></td>
    				<td width='100'><strong>&nbsp;YourHeading5</strong></td>
    			</tr>"
    		& Concat(Sort(YourCollection,YourSortField,Ascending),
    			"<tr>
    				<td>&nbsp;" & YourField1 & "</td>
    				<td>&nbsp;" & YourField2 & "</td>
    				<td>&nbsp;" & YourField3 & "</td>
    				<td>&nbsp;" & YourField4 & "</td>
    				<td>&nbsp;" & YourField5 & "</td>
    			</tr>" 
    		)
    		&
    		"
    		</tbody>
    	</table>
    </div>

     

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up.

  • Verified answer
    mdevaney Profile Picture
    mdevaney 30,012 on at
    Re: How to send Power Apps Collection in Email body

    @kbilakanti 

    I would suggest using CONCAT to convert the collection (myUrls) to a text format.  If you put this code in the body argument of SendEmailV2() it will produce a new line for each URL.

     

    Concat(myUrls, Value & "<br>")

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • WarrenBelz Profile Picture
    WarrenBelz 142,733 on at
    Re: How to send Power Apps Collection in Email body

    Hi @kbilakanti ,

    Try Concat - I do this is several emails, so if you want the code, please let me know.

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

October 2024 Newsletter…

October 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #4 How to Conntact Support…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 142,733

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,750

Leaderboard