Can you require that an email field(ex. subject) to be populated before being able to send?

We are in the process of designing a custom form for a business and were curious if there was a way to require that a field be populated before being able to send.  We want to force a number to be input.  Is this possible?
Infinity SolutionsData, Voice, Internet ServicesAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

omgangIT ManagerCommented:
You should be able to put a field validation formula into the field
Something like  isnumeric([TheFieldThatShouldBeNumeric])=True
The validation will take place when the form is saved.  You should test to see if this occurs on/before Send.
OM Gang

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Infinity SolutionsData, Voice, Internet ServicesAuthor Commented:
Works great thank you.  Would you happen to know if you can make this field unchangeable after the first initial email?
omgangIT ManagerCommented:
Are you asking for replies and forwards?  I don't think so.  Or am I mis-understanding you?
OM Gang
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Infinity SolutionsData, Voice, Internet ServicesAuthor Commented:
Pretty much.  I have it set to read only at the moment in the read page settings but as soon as you hit reply the field is editable and the value resets to default for the form.
omgangIT ManagerCommented:
In general, any email message you reply to or forward is fully editable by you.  There is no method that I know of for the original drafter/sender to 'lock' the content of an email message.
Consider that even if you converted all content on your custom Outlook form to an image file (.bmp, .jpg, etc.) and embedded that image within an email message prior to sending, the recipient could still reply to/forward the message and delete the image.  The image solution may provide the desired effect of preventing the recipient from manipulating the form fields (because they're actually just a part of an image) if they reply/forward.  To do this will require some coding, however, but I think it may be doable.

OM Gang
Infinity SolutionsData, Voice, Internet ServicesAuthor Commented:
Was going to see if i could ask one more thing if you happen you see this.  Is there a specific validation formula to require a job number but could also allow normal letters?  We want them to be able to fill the subject field normally, but not allow the email to be sent unless a job number is also added.
omgangIT ManagerCommented:
Try this for the job number validation; it requires data entry into the field, i.e. field cannot be empty.
\[JobNumber\] "" 
Note that by using the validation formula you can also create a custom error message to the user in the "Display this message if the validation fails" box.

OM Gang
Infinity SolutionsData, Voice, Internet ServicesAuthor Commented:
Having trouble implementing this.  There is a checkbox for requiring a value in the field though.  I was just particularly curious if there was such a statement for words as there is numeric values like the isnumeric(Subject)=true formula you showed us earlier.   And if there is I would like to combine the two with an 'and' statement or something similar if possible.  An alphanumeric requiring formula would also work.
Infinity SolutionsData, Voice, Internet ServicesAuthor Commented:
got the no numeric statement to work but using NOT isnumeric.  Still would like to know if there is a way to do multiple validation formulas for one field.  For example:
       
 NOT isnumeric([Subject])=True AND isnumeric([Subject])=True

This does not work however.  It gives the error popup for validation that I have defined when entering just a number, just letters, and also with both(which is what we would like to validate the formula).
omgangIT ManagerCommented:
I've been playing around with Outlook forms a bit but I admit I'm no expert on them.  A field validation expression like
[Subject]>0 will require something to be entered into Subject field.
I'm not sure I understand your intent with
NOT isNumeric[Subject] AND isNumeric[Subject]
Basically, you want the user to have to enter something into the Subject field (or some other field).  The data can be numbers or text or both?  Is this correct?

OM Gang
Infinity SolutionsData, Voice, Internet ServicesAuthor Commented:
Yes we would like them to be able to enter both text and numbers in the subject line, but require a number no matter what. This made it unable to use the isnumeric statement as text was not able to be input.
I had opened another thread more specifically to this issue and was given some code that ive been able to attach to a macro and get the form to act about how I would like.  Was hoping to not have to do that though if I could figure out if there is a legit validation formula that would work.

Here is my other post:
http://www.experts-exchange.com/questions/28854379/Is-it-possible-to-assign-2-validation-formulas-to-one-field-in-an-outlook-form.html
omgangIT ManagerCommented:
Crystal's solution is a good one.
Your goal is to require a number SOMEWHERE within the form field but to ALSO allow text.
I don't think that's possible with the validation expressions available in the Form designer.  As you know, we can use compound expressions joined with AND or OR operators but, unless I'm missing something, each expression operates on the entire form field contents; that's where the problem lies.  The VBA solution presented by Crystal iterates the length of the form field contents string testing for a numeric value.  This accomplishes the goal the validation expression could not.

OM Gang
Infinity SolutionsData, Voice, Internet ServicesAuthor Commented:
It does seem to work well.  I just noticed though that this now runs on every email and not just the form I created.  Is there a different section to put the code for it to run only on my form?
omgangIT ManagerCommented:
I haven't ever tried but I'm thinking you'll want to modify the VBA code to check to see if it's running on the specified form first and do nothing if it's not, i.e. something like

If {FormName} = "MyCustomForm" Then
   'Proceed with validation
End If

I belive you'd actually check the MessageClass of the current item to determine form name.  Crystal may be able to answer that question better than I.  If not, post back here and I'll see if I can test for you.
OM Gang
Infinity SolutionsData, Voice, Internet ServicesAuthor Commented:
Awesome thanks so much for the help so far, I will test and get back.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Outlook

From novice to tech pro — start learning today.