AnsweredAssumed Answered

Patterncount() function fails to detect match when looking at UUID value

Question asked by BruceHerbach on Mar 28, 2013
Latest reply on Apr 2, 2013 by Fred(CH)

Summary

Patterncount() function fails to detect match when looking at UUID value

Product

FileMaker Pro

Version

FileMaker Pro Advanced 12.0v3

Operating system version

Mac OS X 10.8.2

Description of the issue

Running a script to create related records. Using the Patterncount function to determine if a record has been created.  It fails to detect a match when the - character is part of the UUID.

Steps to reproduce the problem

This is in a script.



Set Variable[$IDlst; List($IDlst; table::ID)]
.
.
.
if[patterncount($IDlst; $newID) = 0]
  new record
  set field...
end if

Expected result

When value in $IDlst = $newID script steps below if are skipped.

Actual result

patterncount fails to detect match and returns 0.  New record is created.

Exact text of any error message(s) that appear

None

Workaround

Use Substitute function to remove the - character from the variable and the value to be compared.  This results in the script working correctly.

Set Variable[$IDlst; List($IDlst; substitute(table::ID; "-'; ""))]
.
.
if[patterncount($IDlst; substitute($newID; "-"; "")) = 0]
  new record
  set field...
end if

Outcomes