AnsweredAssumed Answered

ValueCount has a minor error to be aware of!!!

Question asked by thomasseidler on Feb 25, 2014
Latest reply on Feb 25, 2014 by thomasseidler

Summary

ValueCount has a minor error to be aware of!!!

Product

FileMaker Pro

Version

12 and 13 tested

Operating system version

Mac OS X 10.9.1

Description of the issue

ValueCount misses the last value if it is blank. Which is unhelpful in the event you are trying to determine if two lists are of equal length, you want to count null/empty values too...

Steps to reproduce the problem

ValueCount( "0¶¶2¶3¶4") & ¶ &
ValueCount( "0¶2¶3¶4¶")

Expected result

5
5

Actual result

5
4

Workaround

My own custom function:

VC ( _valueList ):

PatternCount ( Substitute ( _valueList ; "\¶" ; "" ) ; "¶" ) + 1

Outcomes