AnsweredAssumed Answered

Case/If when constantenating fields

Question asked by willrollo on Sep 8, 2011
Latest reply on Sep 9, 2011 by willrollo


Case/If when constantenating fields



I have 5 fields in my 'Enquiry' Table. 

Title (drop down list of 8 or so different titles)

First Name

Last Name.


Addressed to:


What I want is for an automated calculation to appear in the "addressed to:' field that is determined in the other fields. 

If a company name has beenentered, then I want the company name to appear in the 'addressed to:' field. If not, then I want the "title First name and last name' to appear. However, there is a list of othet titles that are constructed differently. E.g if Mr is selected from 'title', then I would like only the first name and last name PLUS "esq" to appear in the 'addressed to:' field. Like wise, if "Lady' is selected, I want to the The Lady 'Last name' to appear. 

I have had some success with this but only with a couple of choices as am getting confused with the brackets, Ifs. else ifs etc...!

Would appreciate a helping hand!

Also, What sort of quick script could I write on 'exit layout' to ensure that these fields have been completed? IS there anyway of making the required, incomplete fields go red por are asterisked like on a web form?

Thank you