AnsweredAssumed Answered

Max Function not working correctly

Question asked by BrettCox on Sep 20, 2010
Latest reply on Sep 20, 2010 by philmodjunk

Summary

Max Function not working correctly

Product

FileMaker Pro

Version

11.x

Operating system version

10.6.x

Description of the issue

I have a script that is used to create a job number by incrementally updating the number by 1 each time a new record is created.  It begins with 01 then drops the beginning 0 after 9.  This script worked in both FMP9 and 10.

Steps to reproduce the problem

Created a new DB with only the the fields needed to incrementally increase the number.

Case ( Max ( Self Job Serial Count::Job Serial ) = 0 ; "01" ; Max ( Self Job Serial Count::Job Serial ) < 9 ; "0" & Max ( Self Job Serial Count::Job Serial ) +1 ; Max ( Self Job Serial Count::Job Serial ) ≥ 9 ; Max ( Self Job Serial Count::Job Serial ) +1 )

Expected result

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13...

Actual result

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 011, 012, 013...

Exact text of any error message(s) that appear

No error message

Configuration information

1 table titled "Job Records"
2 fields "Job Serial", "Job Number"
1 relationship "self Job Serial Count" : "Job Number" = "Job Number"

Workaround

Revert to FMP10

Outcomes