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

Adding Attachment (Image) to Email when already have a Concat Formula

Hi,

I'm wanting to send an email out with an image and some information.

I have a Concat formula already which details the information.  I

 

now want to add an attachment to the email that relates to the information. The Concat formula is 

 

Office365.SendEmail(
"Email address", (Receptiant email is included in original formula)
"Perimeter Check Issues",
Concat(Perimeterissue,
"Building: " & Building & Char(10) &
"Area: " & Title & Char(10) &
"Comments: " & Comments & Char(10),
"Issue: " & Issue & Char(10) & Char(10)
)
)

'Perimeterissue' is the name of my collection which also contains the image. 

 

The Collection is triggered by Clicking on the Camera function

 

Collect(
Perimeterissue,
{
Title: txtChecklistSpecificArea.Text,
Image: txtChecklistSpecificArea.Text & " .jpg",ContentBytes:Camera1.Photo,'@odata.type':"",
Hint: txtChecklistDescription.Text,
Building: drpSelectedBuilding.Selected.Result,
Issue: RadChecklist.Selected.Value,
Comments: txtChecklistComments.Text,
CheckedBy: txtCheckedBy.Text,
Date: txtDate.Text,
Time: txttime.Text
}
);
Reset(RadChecklist);
Reset(txtChecklistComments);

 

Any assistance would be grateful

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver I
Resolver I

Re: Adding Attachment (Image) to Email when already have a Concat Formula

Hi 

Solved it.

I had a opening bracket before the Concat.  Doh!!!!!

Removed that and it works perfectly. 

Thanks for your help

View solution in original post

9 REPLIES 9
Highlighted
Dual Super User III
Dual Super User III

Re: Adding Attachment (Image) to Email when already have a Concat Formula

HI @ClarkyPA365 

 

Can you try to update your expressions as:
 
Collection Creation:
 
Collect(
Perimeterissue,
{
Title: txtChecklistSpecificArea.Text,
Name: txtChecklistSpecificArea.Text & " .jpg",ContentBytes:Camera1.Photo,'@odata.type':"",
Hint: txtChecklistDescription.Text,
Building: drpSelectedBuilding.Selected.Result,
Issue: RadChecklist.Selected.Value,
Comments: txtChecklistComments.Text,
CheckedBy: txtCheckedBy.Text,
Date: txtDate.Text,
Time: txttime.Text
}
);
Reset(RadChecklist);
Reset(txtChecklistComments);
 
Attachments in the outlook connector expects its columns to be Name and ContentBytes.
 
Send Email:
 
Office365.SendEmail(
"Email address", (Receptiant email is included in original formula)
"Perimeter Check Issues",
Concat(Perimeterissue,
"Building: " & Building & Char(10) &
"Area: " & Title & Char(10) &
"Comments: " & Comments & Char(10),
"Issue: " & Issue & Char(10) & Char(10)
),
{Attachments:ShowColumns(Perimeterissue,"Name","ContentBytes")}
)
 
 
This will add the attachments in your email. This supports more than 1 attachment based on the collection.
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted
Resolver I
Resolver I

Re: Adding Attachment (Image) to Email when already have a Concat Formula

Hi @yashag2255 

Thanks for your reply.

I've amended my formulas to the changes you have hi-lighted.

 

The send email formula is show red underlining

Office365.SendEmail(
"Email",
"Perimeter Check Issues",
(Concat(Perimeterissue,
"Building: " & Building & Char(10) &
"Area: " & Title & Char(10) &
"Comments: " & Comments & Char(10) &
"Issue: " & Issue & Char(10) & Char(10)
),
{Attachments:(Perimeterissue,"Name","ContentBytes")}
)

Where you have emoji and howcolumns what needs to be here? 

Highlighted
Dual Super User III
Dual Super User III

Re: Adding Attachment (Image) to Email when already have a Concat Formula

@ClarkyPA365 '

 

Can you try with this?

 
Collect(
Perimeterissue,
{
Title: txtChecklistSpecificArea.Text,
Name: txtChecklistSpecificArea.Text & " .jpg",ContentBytes:Camera1.Photo,'@odata.type':"",
Hint: txtChecklistDescription.Text,
Building: drpSelectedBuilding.Selected.Result,
Issue: RadChecklist.Selected.Value,
Comments: txtChecklistComments.Text,
CheckedBy: txtCheckedBy.Text,
Date: txtDate.Text,
Time: txttime.Text
}
);
Reset(RadChecklist);
Reset(txtChecklistComments);
 
Attachments in the outlook connector expects its columns to be Name and ContentBytes.
 
Send Email:
 
Office365.SendEmail(
"Email address", (Receptiant email is included in original formula)
"Perimeter Check Issues",
Concat(Perimeterissue,
"Building: " & Building & Char(10) &
"Area: " & Title & Char(10) &
"Comments: " & Comments & Char(10),
"Issue: " & Issue & Char(10) & Char(10)
),
{Attachments: ShowColumns(Perimeterissue,"Name","ContentBytes")}
)
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted
Resolver I
Resolver I

Re: Adding Attachment (Image) to Email when already have a Concat Formula

Hi @yashag2255 

Thanks for that couldn't find a formula howcolumns.  Not sure why the emoji displays in the community form but not in the email I get???

I still seem to be getting an error against th last 'Comma' before the curly brace {Attachment........ 

 

Error Msg Unexpected characters. The formula contains 'ParenClose' where comma is expected.

Highlighted
Dual Super User III
Dual Super User III

Re: Adding Attachment (Image) to Email when already have a Concat Formula

Hi @ClarkyPA365 

 

I think the error is occurring because of the body passed in email, there is a comma in between which might cause this issue. Can you try below expression:
 
Office365.SendEmail(
"Email address",
"Perimeter Check Issues",
Concat(Perimeterissue,
"Building: " & Building & Char(10) &
"Area: " & Title & Char(10) &
"Comments: " & Comments & Char(10) &
"Issue: " & Issue & Char(10) & Char(10)
),
{Attachments: ShowColumns(Perimeterissue,"Name","ContentBytes")}
)
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted
Resolver I
Resolver I

Re: Adding Attachment (Image) to Email when already have a Concat Formula

Hi

 

Still getting the last comma underlined in red and the same error message?

 

Office365.SendEmail(
"Email",
"Perimeter Check Issues",
(Concat(Perimeterissue,
"Building: " & Building & Char(10) &
"Area: " & Title & Char(10) &
"Comments: " & Comments & Char(10) &
"Issue: " & Issue & Char(10) & Char(10)
),
{Attachments:ShowColumns(Perimeterissue,"Name","ContentBytes")}
)

 

 

 

Highlighted
Dual Super User III
Dual Super User III

Re: Adding Attachment (Image) to Email when already have a Concat Formula

@ClarkyPA365 

 

Can you please share a screenshot? (of the error message and the expression on the control)

Highlighted
Resolver I
Resolver I

Re: Adding Attachment (Image) to Email when already have a Concat Formula

Hi,

I've attached two screenshots showing the formula without the error msg and one with the error msg

Highlighted
Resolver I
Resolver I

Re: Adding Attachment (Image) to Email when already have a Concat Formula

Hi 

Solved it.

I had a opening bracket before the Concat.  Doh!!!!!

Removed that and it works perfectly. 

Thanks for your help

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,786)