4 Replies Latest reply on Aug 16, 2013 2:36 PM by philmodjunk

    MiddleWords function - unexpected results

    abnms8695

      Summary

      MiddleWords function - unexpected results

      Product

      FileMaker Pro

      Version

      11

      Operating system version

      Windows 7

      Description of the issue

      MiddleWords function - unexpected results parsing string - i.e. truncating second word

      Steps to reproduce the problem

      string=AqTot/ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn

      MiddleWords (string, 2, 1)

      returns:
      ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K

      however this string works:

      SolTotDry/ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn

      ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn

      Exact text of any error message(s) that appear

      no error

        • 1. Re: MiddleWords function - unexpected results
          philmodjunk

               Curious: I can reproduce this in Windows 7 in both FileMaker 11 and 12

               More Curious: If I edit the second expression by typing--not pasting to change the 1st word to match your original example, it also fails.

               Even More Curious, If I change the first letter to anything but A or a, it then works. I can even insert a different character in front of the a and it then works.

               And stranger yet: If I change the first word to just "a", it works. If I add one more letter, such as making it "ag", it fails.

               Changing the character that serves as a word separator has no effect.

               As a work around, you might append a space character to the beginning of the string as this will not change the Word counts or word positions but will avoid this bug.

          • 2. Re: MiddleWords function - unexpected results
            abnms8695

                 Most excellent find! thanks! I did a string "count" test - check this out:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                1/ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn                     ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn
                                12/ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn                     ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se
                                123/ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn                     ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn
                                1234/ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn                     ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn
                                12345/ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn                     ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K
                                123456/ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn                     ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn
                                1234567/ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn                     ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni
                                12345678/ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn                     ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn
                                123456789/ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn                     ICPMets.Al.Sb.As.Ba.Be.Cd.Ca.Cr.Co.Cu.Fe.Pb.Mg.Mn.Hg.Ni.K.Se.Ag.Na.Tl.V.Zn

                  

            • 3. Re: MiddleWords function - unexpected results

              Timothy Schaper:

                   Thank you for the post.

                    

                   I am able to reproduce this behavior in FileMaker Pro 11 and FileMaker Pro 12 installed on either Windows 7 or Mac OS X 10.8.4. I forwarded a full report to Testing and Development for review.  

                    

                   TSFalcon

                   FileMaker, Inc.

              • 4. Re: MiddleWords function - unexpected results
                philmodjunk

                     This report has been linked to an entry in the Known Bugs List. Any comments, questions, corrections about the info in that list should be posted here or in a new thread, not in the Known Bugs List thread.