cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jharville1
Helper IV
Helper IV

Add "Urgent" text in beginning of email if "Urgent" is selected in drop-down

I have a form that contains a drop-down called "Turnaround Time", where the user can either choose:

1) Standard

2) Urgent

 

After the form is completed and submitted, an email is automatically sent to a designated Approver. If the user selects "Standard", the email will be sent as normal (I already have written code to successfully send an email to an Approver):

 

jharville1_2-1608310992978.png

 

However, if the user selects "Urgent", I'd like for the subject of the email sent to have a small change compared to if Standard was selected...I'd like for the subject to add "Urgent!" in the very beginning of the text.

 

Ex: The subject of a standard email is --> "You have a new request for approval" ... so when a user selects "Standard" that will be the subject of the email. However, if the user selects "Urgent" from the drop-down, the subject should say "Urgent! You have a new request for approval"

 

jharville1_1-1608310935427.png

 

I've been trying to use If statements but my syntax must be off since I've been having issues. In a sense, I'm trying to type:
If(varRecord.timeline = "Urgent", ___do this action_____, ___if not, do this action_____ )

 

 

Thank you!

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@jharville1 

Consider changing your formula to:

   If(varRecord.timeline.Value = "Urgent", "Urgent! ") & varRecord.'Created By'.DisplayName ....

 

I assume varRecord is just a redundant variable based on the record submitted and has the record in it and that timeline is a Choice column.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
RandyHayes
Super User III
Super User III

@jharville1 

Consider changing your formula to:

   If(varRecord.timeline.Value = "Urgent", "Urgent! ") & varRecord.'Created By'.DisplayName ....

 

I assume varRecord is just a redundant variable based on the record submitted and has the record in it and that timeline is a Choice column.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

jharville1
Helper IV
Helper IV

This worked perfectly, thanks again as always Randy. I really appreciate your help!

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,177)