2 Replies Latest reply on Sep 7, 2011 8:10 AM by willrollo

    If question

      Title

      If question

      Post

      Hi

      If I want a script to occur if a field is empty, then how do I go about this?

      I wrote this:

      If ( Type = "trade" ; Company ;  First Name & " " & Surname )

      The field is called 'Type'. If the word "Trade" is put in the field then I want the 'Company' field to show whatever name the user has entered for company. If there is nothing entered, then I want the first and surname entered automatically...

      Any ideas? I know the answer is a simple one but I jsut cant find where it explains this in my mssing manual book..

      thank you

        • 1. Re: If question
          juancardona

          Try this:

           

          Case ( 

                     isEmpty(Type) ; First Name & " " & Surname ;

                     Type = "trade" ; Company

          )

          • 2. Re: If question

            Sorry - I deleted your answer by mistake when trying to award it best answer! It works perfectly so thank you.

            it occurred to me that if I wanted to write the same script to cover a lot of fileds (to ensure user had filled them in), what would be the best way of going about this - could you write me up a small example? IS there anyway of showing reunderlin on missing compulsory fields, rather like you woudl get on a website?

            Thank you