1 Reply Latest reply on Nov 13, 2013 7:57 PM by philmodjunk

    If issue

      Title

      If issue

      Post

           I am trying to replace field contents using a calculation. 

           The scenario I have is that i Have one a linked table (Old)that has a two fields called Old::FulName and Old::Title For example, Fullname contains the data "Mr John Smith" and Title contains Mr or in some cases it contains the first name. 

           I have tried to import this data into my customers table where i have 4 fields.

           FullName (direct calc =Old::Fullname),

           Customers::Title

           Customers::First_Name 

           Customers::Second name

           I want to make write a script that will do the following when I replace the field contents of Customers::Title

           If Old::title doesn't contain the following text, "Mr/Mrs/Dr" then I want the data that is in Old::Title to copy over to First name, as sometimes the Old::Title field contains the first name

           I tried using a case with 'ands' or 'Ors' or neither between each of the title types, but the title would copy over in every field instead of those that did not contain the title mentioned in the script...Confusing but hope someone can help this simple problem...

        • 1. Re: If issue
          philmodjunk

               Seems like you have multiple replace field contents operations, one to update Title, one for First_name and a third for second name.

               Calculation to update Title: If ( Patterncount ( "MrMrsDr" ; Filter ( Lower ( Old::Title ) ; "abcdefghijklmnopqrstuvwxyz" ) ) ; Old::title )

               Calculation to update First_Name: If ( Not Patterncount ( "MrMrsDr" ; Filter ( Lower ( Old::Title ) ; "abcdefghijklmnopqrstuvwxyz" ) ) ; Old::title ; First_Name )