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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (23,270)