2 Replies Latest reply on Mar 7, 2016 10:29 PM by keywords

    Scripting Syntax

    peterfloyd

      I am trying to Replicate a record (keep all the same address information and NameLast, but replace the Title with blank, First Name with blank, etc. to add family members to a DB.  This is to make data entry easier so the person only has to change the Title, First Name, Phone Number, etc. for their spouse or child.

       

      I have duplicated a record, and then used a script to replace some of the fields in the duplicated record with " " (i.e. blank space).

       

      Everything works as expected except the fields that I want deleted have a "0" in them instead of nothing. When the script runs, it fills all the deleted fields with 0 instead of nothing.

       

      Can someone help me?

       

      Thanks,

       

      Pete

        • 1. Re: Scripting Syntax
          Stephen Huston

          This sounds like a place where you could just make the first name a related table record to avoid all this redundant family data....

           

          However, you should set your field to be cleared to "" (without a space) if you want empty text fields.

           

          (Also be sure your fields are indexed as Text not Numbers. You can put text in number fields but it won't index properly and null or spaces sometimes return zero as the result. )

          1 of 1 people found this helpful
          • 2. Re: Scripting Syntax
            keywords

            Stephen is right, you possibly should give consideration to how your data is organised. Be that as it may:

             

            Re you immediate query:

            1.     I'm not sure why you would replace field content with  " " (i.e. blank space) instead of "" (i.e. zero content). That space you are putting in is bound to trip you up somewhere along the line.

            2.     If you are in fact getting 0 (that is, zero) not O (that is uppercase O) could it be that the fields are number instead of text?

            1 of 1 people found this helpful