cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kendals
Frequent Visitor

Random GUID in Subject of Office365.SendMail

I would like to add a unique ID to the subject line as well as the current subject text of "Ticket has been issued".

 

Office365.SendEmail(InputTo.Text, InputSubject.Text,InputBody.Text, {Attachments:Table({Name:"file1.png", ContentBytes:AddMediaButton7.Media,'@odata.type':""})})=true && Reset(InputBody) && Reset(AddMediaButton7) && Navigate(SubmitFinish, ScreenTransition.Fade)

I was thinking it could be todays date in a string as 290819 or some other GUID. The email subject i would like would be

"Ticket has been issued Ref:-------"

 

Can anyone help?

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @kendals ,

Do you want to add date in the subject?

Try this formula:

Office365.SendEmail(InputTo.Text,InputSubject.Text&":"&Text(Today(),"yyyymmdd"),
InputBody.Text, {Attachments:Table({Name:"file1.png", ContentBytes:AddMediaButton7.Media,'@odata.type':""})})=true && Reset(InputBody) && Reset(AddMediaButton7) && Navigate(SubmitFinish, ScreenTransition.Fade)

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
panand99
Solution Supplier
Solution Supplier

@kendals 

 

Best Way- add record ID in the email

 

You can get the record ID on OnSuccess Event of the requested form by using - formRequest.LastSubmit.ID

kendals
Frequent Visitor

not sure where i can add this? can you help?

panand99
Solution Supplier
Solution Supplier

If u submit your form, then it will on your form onsuccess event.
kendals
Frequent Visitor

I am not using any sharepoint lists or forms. Its just a few text boxes with a submit button.

On the submit is the code above.

kendals
Frequent Visitor

I have looked at it but don’t know how to put this into the subject of the email
v-yutliu-msft
Community Support
Community Support

Hi @kendals ,

Do you want to add date in the subject?

Try this formula:

Office365.SendEmail(InputTo.Text,InputSubject.Text&":"&Text(Today(),"yyyymmdd"),
InputBody.Text, {Attachments:Table({Name:"file1.png", ContentBytes:AddMediaButton7.Media,'@odata.type':""})})=true && Reset(InputBody) && Reset(AddMediaButton7) && Navigate(SubmitFinish, ScreenTransition.Fade)

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,305)