7 Replies Latest reply on Sep 16, 2015 1:53 PM by TSGal

    Separator counts as member of value list

    LaRettaK

      FMPA 14.0v2, Mavericks


      If one sets up a field to validate as 'member of value list'

      AND

      If that value list is custom and it includes a dash separator

      THEN

      ... typing a dash in the field will PASS validation.


      The dashes also appear when calculation is:

      ValueListItems ( Get ( FileName ) ; "customList" ) 


      ... and are counted with ValueCount() of the value list.


      This means that tests we use to see if ALL custom values are checked in a field (bringing a checklist to completion) fails, if there are separators:

       

      Let (

      values = ValueListItems ( Get ( FileName ) ; "customList" ) ;

      ValueCount ( FilterValues ( values ; field ) ) = ValueCount ( values )

      )

       

      And finally, scripts which use loops and first counts the number of values in these custom value lists, will loop a higher count than intended which could bring dire consequences.  This bug also exists in version 11 so it has been around for quite some time.

        • 1. Re: Separator counts as member of value list
          TSPigeon

          LaRettaK:

           

          Thank you for your post.

           

          I am able to reproduce the behavior you describe in both Mac OS X and Windows with FileMaker Pro 14.0.2 (Advanced) and older.

           

          FileMaker will treat "-" (the divider) as part of the value list, so it would validate (if typed, which you also resolved with a validation calculation) and would show in a count of the Value List items.

           

          It is currently expected and works this way by design. I recommend entering this suggestion into the Feature Requests Web Form.

           

          TSPigeon

          FileMaker, Inc.

          • 2. Re: Separator counts as member of value list
            LaRettaK

            If we can't select the dash as a value in a value list, how in the world can it be counted as a legitimate possible value?

             

            I am afraid this makes no sense at all and I strongly disagree with this decision.

            • 3. Re: Separator counts as member of value list
              raybaudi

              How long we can trust to this "expected" behavior?

              May we base our apps on it?

               

              To fool around a bit and staying on the subject, how did I do that?

              How did I do that.png

              There is one value list in the DB and only one occurrence of a field on the layout.

              • 4. Re: Separator counts as member of value list
                TSGal

                LaRettaK:

                 

                This design issue has been reopened for investigation.  When more information becomes available, I will post again.

                 

                TSGal

                FileMaker, Inc.

                • 5. Re: Separator counts as member of value list
                  TSGal

                  raybaudi:

                   

                  Thank you for your post.

                   

                  I have previously not seen your type of issue, and I realize that doesn't help you.  However, I am able to replicate your exact issue by modifying the value list so that I press option-return after "c", and option-return before "d".  This makes "c" the only entry in that column, and "d" appear at the bottom of the next column.  That is, after entering "a" through "g" in the value list, go to the end of "c" and press option-return, and then place my cursor before "d" and press option-return.

                   

                  TSGal

                  FileMaker, Inc.

                  • 6. Re: Separator counts as member of value list
                    raybaudi

                    Hi TSGal

                     

                    no, I said that I was staying on the subject ( and no issue at all, just a joke ).
                    See the pict !

                    TSGal.png

                    • 7. Re: Separator counts as member of value list
                      TSGal

                      LaRettaK and raybaudi:

                       

                      Development said this is not an issue.  In essence, when you have a situation where a selection must be in the value list, you should use a Pop-up menu so a user cannot just enter a hyphen/dash.  If using a drop-down list, then you should check BOTH "Member of a value list" and "Validated by calculation", where the calculation is {field contents} <> "-".

                       

                      For radio buttons or checkboxes, you do not need values separated by a dash.

                       

                      TSGal

                      FileMaker, Inc.