August 5, 201114 yr 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
August 5, 201114 yr 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
Create an account or sign in to comment