1 Reply Latest reply on Jan 31, 2016 11:14 PM by davidhead

    Copy part of a field to another field

    ManuelJrMendoza

      Hello!

       

      I need to copy part of a field to another field.  For example, the field where I am going to copy from has the content "SAN PABLO CITY 4000."  I only want to copy "4000."  Other contents of the field where I am copying from has similar pattern such as "STA ROSA 4023", "NAGA 5400", etc.  I just need to copy the number in that field and paste it in another field.  So the one to be the pasted is the number only.

       

      Appreciate any help.

        • 1. Re: Copy part of a field to another field
          davidhead

          There are a few ways you could do this. You need a calculation and then a method to trigger it.

           

          For the calculation you might use:

          1. If you know the number you want is always the last 'word' in the field, you can use: 

                         RightWords ( SourceField ; 1 )

          2. If you know the number will always be a number, the only number, and not start with zero, you can use:

                         GetAsNumber ( SourceField )

           

          For the trigger, you could use:

          1. A button that runs a single step: Set Field [ TargetField; calculation ]

          2. Auto-enter calculation on the target field which has "Do not replace existing value" unchecked

          3. A script trigger on the source field if data is manually entered

           

          There may also be other ways. Would one of these work for you?