cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Random GUID in Subject of Office365.SendMail

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
Highlighted
Skilled Sharer
Skilled Sharer

Re: Random GUID in Subject of Office365.SendMail

@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

Highlighted
Frequent Visitor

Re: Random GUID in Subject of Office365.SendMail

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

Highlighted
Skilled Sharer
Skilled Sharer

Re: Random GUID in Subject of Office365.SendMail

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

Re: Random GUID in Subject of Office365.SendMail

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.

Highlighted
Power Apps
Power Apps

Re: Random GUID in Subject of Office365.SendMail

Highlighted
Frequent Visitor

Re: Random GUID in Subject of Office365.SendMail

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

Re: Random GUID in Subject of Office365.SendMail

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
secondImage

New Return to Workplace

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

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,909)