5 Replies Latest reply on Apr 20, 2009 9:48 AM by Orlando

    doing something wrong, but can't see it

    DonorTracker

      Title

      doing something wrong, but can't see it

      Post

      Can you help me figure out what I'm doing wrong?  I just can't see it.

       

      I can't get this concatenated text field, name_first_and_last, to show any data:

       

      name_first text
      name_last text indexed
      name_first_and_last text Auto-enter Calculation replaces existing value

      Here is the calculation:

      name_first & " " &  name_last

      Evaluate this calcuation from the context of INCOME
      Current Table ( "INCOME" )
      Do not evaluate if all reference fields are empty is checked

       

      name_first and name_last show up correctly in my layout, but name_first_and_last is empty -- though I can type text into it.

       

      How can I make it automatically populate with the concatenation of the first and last names?  THANKS!





        • 1. Re: doing something wrong, but can't see it
          Orlando
            

          Hi DonerTracker

           

          Try making the name_first_and_last field a standard calculation, instead of a text with Auto-enter Calculation. Unless you need to be abel to modify the value without affecting the individual names field.

           

          In Define Database select the field and change the 'Type:' to Calculation and click 'Change'

           

          The Calculation dialog will appear and it may already have your Auto-enter Calculation specified, but you could try this one, as it will no put in any spaces if either name is missing:

           

          Substitute ( List ( name_first ; name_last ) ; "" ; " " )

           

          Now once you go back into Browse Mode the name should be concatenated, but you will not be able to modify it.

           

          I hope this helps.

          • 2. Re: doing something wrong, but can't see it
            DonorTracker
              

            Orlando, thanks once again for your detailed, helpful suggestions.

             

            Experimenting, I find that if I create a new record, my concatenated field (as originally designed) populates correctly; it just doesn't work for existing records.

             

            Is there a standard way to deal with that sort of situation with a script/trigger?

             

            (I'm avoiding your suggested solution for now because I would like to be able to manually modify the name_first_and_last field for some records.)

            • 3. Re: doing something wrong, but can't see it
              Orlando
                

              You can run a replace on the field to set the value in all previous record with no value, which will initially set the value and then the Auto-enter Calculation will trigger on new records.

               

              First perform a find to isolate all the record with no value in the name_first_and_last field, so in Find Mode place a '=' in the field and 'Perform find'.

               

              To do this click into the field and go 'Records > Replace Field Contents...' now when the dialog appears you want to double check the field it will replace, and then select 'Specify...' next to 'Replace with calculated result:' and input the same calculation your are using for the Auto-enter, you will need to add the table name in with the field name:

               

              INCOME::name_first & " " &  INCOME::name_last 

               

              And then click 'OK' and then 'Replace'

               

              This will then update all the records that are empty. 

               

               

              • 4. Re: doing something wrong, but can't see it
                DonorTracker
                   Orlando, again many thanks!  That, too, works a treat!
                • 5. Re: doing something wrong, but can't see it
                  Orlando
                     Glad I could help.