JD2775 Posted August 5, 2011 Posted August 5, 2011 Hi all, i am not sure whether to post this here or in the Managing Scripts forum. Anyway, I have a Maintenance Database with an Email script set-up that when clicked sends an email out with a request order. In the body of the email is 6-7 fields/data pulled from the Layout. I have the subject line set up as: "Maintenance Request: " & Get (CurrentDate) I added a new field to the table/layout "Priority". This is a Yes/No checkbox that defaults to "No" What I want to do is, if the checkbox is set to "Yes" I want the Subject Line to go from this: Maintenance Request 8/5/2011 To this: Maintenance Request 8/5/2011 HIGH PRIORITY Any idea how to make this happen? Thanks
bcooney Posted August 5, 2011 Posted August 5, 2011 Create a calc field, result text: email_Subject_c = if ( Priority = "Yes" ; "Maintenance Request: " & Get (CurrentDate) & " HIGH PRIORITY" ; "Maintenance Request: " & Get (CurrentDate)) Use this field as your subject in the email. fwiw, typically, I don't use Yes/No fields. I create a flag field that is either 1 or null. So, in this case I'd have flag_PriorityHigh and I'd put it on the form view formatted as a checkbox with a value list that simply equals 1. Then, resize the checkbox to not show the field label or the 1. Then, the calc would be If (Priority=1; etc.) hth, Barbara
Recommended Posts
This topic is 4916 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now