I am trying to use the Attachment function so users can send an attachement with an email. But I am getting errors in my formula. Any ideas? I did some more hovering over the formula and it gave me some more errors to look at. Thank you!!
“Missing column. Your formula is missing a column ‘Attachemnts.ContentBytes’ with a type of ‘Blob’”
“The function ‘AddColumns’ has some invalid arguments”
Solved! Go to Solution.
Hi @Anonymous ,
The Attachments need to go after the body (not before it). Also you do not need IsHtml in V2 of SendEmail
Office365.SendEmailV2(
"xxxx@xxxx.com",
"New Ticket" & " - " & CategoryDD.SelectedText.Value & " - " & PriorityDD.SelectedText.Value,
"<b>Date Created: </b>" & DateCreatedValue & "<br>" &"<b>Ticket Submitted By: </b>" & NameText &
"<br>" & "<b>Email: </b>" & EmailText & "<br>" & "<b>Priority: </b>" & PriorityDD.SelectedText.Value &
"<br>" & "<b>Category: </b>" & CategoryDD.SelectedText.Value & "<br>" & "<b>Subject: </b>" &
SubjectText & "<br>" & "<b>Description of Issue: </b>" & DescriptionText & "<br>",
{
Attachments:
AddColumns(
RenameColumns(
AttachmentBox.Attachments,
"Value",
"ContentBytes"
),
"@odata.type",
""
)
}
);
SubmitForm(NewTicketForm);
ResetForm(NewTicketForm);
Navigate(HomeScreen, ScreenTransition.Cover)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @Anonymous ,
What is the name of your Attachment Control? You need to put that where you have Attachment Control
You have also misspelt RenameColumns
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
@Anonymous ,
Did it work with the spelling correction? I just did a test here with
Office365Outlook.SendEmailV2(
User().Email,
"Test Attach",
"Here they are",
{
Attachments:
AddColumns(
RenameColumns(
AttachmentsControl.Attachments,
"Value",
"ContentBytes"
),
"@odata.type",
""
)
}
)
and received the mail back with attachments.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Yes, the misspelling correction fixed the issue. Now I am trying to add the attachment part of the formula to my original send email formula now that I am using an attachment but getting errors. I am thinking it is with brackets or parenthesis but not sure. Can you spot the error? Thanks!
Office365.SendEmailV2("xxxx@xxxx.com","New Ticket" & " - " & CategoryDD.SelectedText.Value & " - " & PriorityDD.SelectedText.Value,{Attachments: AddColumns( RenameColumns(AttachmentBox.Attachments,"Value", "ContentBytes"), "@odata.type", "") )}, "<b>Date Created: </b>" & DateCreatedValue & "<br>" &"<b>Ticket Submitted By: </b>" & NameText & "<br>" & "<b>Email: </b>" & EmailText & "<br>" & "<b>Priority: </b>" & PriorityDD.SelectedText.Value & "<br>" & "<b>Category: </b>" & CategoryDD.SelectedText.Value & "<br>" & "<b>Subject: </b>" & SubjectText & "<br>" & "<b>Description of Issue: </b>" & DescriptionText & "<br>", {IsHtml: true});
SubmitForm(NewTicketForm);
ResetForm(NewTicketForm);
Navigate(HomeScreen, ScreenTransition.Cover)
Okay, I fixed the formula now and have no errors and I can add attachment and click to submit email. However, the email has no attachment. I looked in the attachment collection and I see the attachment so not sure why it didn't come through on email.
Office365.SendEmailV2("xxxx@xxxx.com","New Ticket" & " - " & CategoryDD.SelectedText.Value & " - " & PriorityDD.SelectedText.Value, {Attachments: AddColumns( RenameColumns(AttachmentBox.Attachments,"Value", "ContentBytes"), "@odata.type", "") };
"<b>Date Created: </b>" & DateCreatedValue & "<br>" &"<b>Ticket Submitted By: </b>" & NameText & "<br>" & "<b>Email: </b>" & EmailText & "<br>" & "<b>Priority: </b>" & PriorityDD.SelectedText.Value & "<br>" & "<b>Category: </b>" & CategoryDD.SelectedText.Value & "<br>" & "<b>Subject: </b>" & SubjectText & "<br>" & "<b>Description of Issue: </b>" & DescriptionText & "<br>", {IsHtml: true});
SubmitForm(NewTicketForm);
ResetForm(NewTicketForm);
Navigate(HomeScreen, ScreenTransition.Cover)
Hi @Anonymous ,
The Attachments need to go after the body (not before it). Also you do not need IsHtml in V2 of SendEmail
Office365.SendEmailV2(
"xxxx@xxxx.com",
"New Ticket" & " - " & CategoryDD.SelectedText.Value & " - " & PriorityDD.SelectedText.Value,
"<b>Date Created: </b>" & DateCreatedValue & "<br>" &"<b>Ticket Submitted By: </b>" & NameText &
"<br>" & "<b>Email: </b>" & EmailText & "<br>" & "<b>Priority: </b>" & PriorityDD.SelectedText.Value &
"<br>" & "<b>Category: </b>" & CategoryDD.SelectedText.Value & "<br>" & "<b>Subject: </b>" &
SubjectText & "<br>" & "<b>Description of Issue: </b>" & DescriptionText & "<br>",
{
Attachments:
AddColumns(
RenameColumns(
AttachmentBox.Attachments,
"Value",
"ContentBytes"
),
"@odata.type",
""
)
}
);
SubmitForm(NewTicketForm);
ResetForm(NewTicketForm);
Navigate(HomeScreen, ScreenTransition.Cover)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
@Anonymous ,
Nothing has changed other than putting the attachments in the right place.
You have not referred to your SQL table name - the control values will work as they are "static". Are you sending this from inside or outside a form or gallery?
I figured it out. I edited my reply to remove the question about SQL. We are all good.
Thanks for your help!!
User | Count |
---|---|
121 | |
88 | |
87 | |
75 | |
66 |
User | Count |
---|---|
215 | |
179 | |
138 | |
96 | |
82 |