web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Random GUID in Subject...
Power Apps
Answered

Random GUID in Subject of Office365.SendMail

(0) ShareShare
ReportReport
Posted on by 12

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?

Categories:
  • panand99 Profile Picture
    641 on at

    @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 Profile Picture
    12 on at

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

  • panand99 Profile Picture
    641 on at
    If u submit your form, then it will on your form onsuccess event.
  • kendals Profile Picture
    12 on at

    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.

  • McCall Saltzman Profile Picture
    Microsoft Employee on at
  • kendals Profile Picture
    12 on at
    I have looked at it but don’t know how to put this into the subject of the email
  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    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,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard