1 Reply Latest reply on Jan 26, 2015 8:02 AM by TSGal

    trimall has a bug

    HerbertFluhler

      Summary

      trimall has a bug

      Product

      FileMaker Pro

      Version

      13

      Operating system version

      Mac

      Description of the issue

      The trimALL function has a bug.  If you text is substantially tab delimited, but also has spaces and also has a minus sign in front of the number (data) between the space and tab delimits, trimALL will not deleted the TAB.  In other cases it will if there is no minus sign (dash) in front of the data.

      Steps to reproduce the problem

      Parse this data below with trimALL and you will find that the TABs are no all replaced with spaces as they should be if they are in front of the minus sign:

         3     -2162334.0     -4894337.0      3458895.0       16.528883      123.113213      -77.112038      146.2       136      32.88005     -113.83600        136          0      -142.0        34.6        0.0       -90.0        71.9        0.000000        0.000000        0.000000        0.000000        0.000000        0.000000     -0.606276     -0.605002      0.516141        0.000         0.0

      Expected result

      I expect ALL white spaces to be replaced with a single space no matter what the source of the white space is, and also it should not be impacted by a minus sign or any other character.

      Actual result

      The following is the result after using trimALL and then trying to replace the single spaces that should have been there with paragraph marks in order to create a value list (that is what I was trying to do with this):

      3     -2162334.0     -4894337.0     
      3458895.0     
      16.528883     
      123.113213     
      -77.112038     
      146.2     
      136     
      32.88005     -113.83600     
      136     
      0     
      -142.0     
      34.6     
      0.0     
      -90.0     
      71.9     
      0.000000     
      0.000000     
      0.000000     
      0.000000     
      0.000000     
      0.000000     -0.606276     -0.605002     
      0.516141     
      0.000     
      0.0

      Workaround

      Maybe I can first replace all the tabs with spaces but I am not sure of the impact of the minus signs.  In a prior example my code worked perfectly when the data was exported without TABS.

        • 1. Re: trimall has a bug
          TSGal

          Herbert Fluhler:

          Thank you for your post.

          First, TrimALL function trims spaces; not tabs.

          Second, I am unable to replicate the issue.  I entered the same data as you, used the TrimAll function to first remove the spaces, and then used the Substitute function to change the tab characters into returns.

          Can you verify the characters preceding your negative values are indeed spaces or tabs?

          TSGal
          FileMaker, Inc.