AnsweredAssumed Answered

Unexpected Error 502 When Using Script to Set Number Field With Always Validate Numeric Only

Question asked by kurisutofaa on Jul 31, 2014
Latest reply on May 12, 2015 by TSGal

Summary

Unexpected Error 502 When Using Script to Set Number Field With Always Validate Numeric Only

Product

FileMaker Pro

Version

13.0.3

Operating system version

Mac OS X 10.9.4

Description of the issue

It appears impossible to take the value from one number field that contains non-numeric characters and set another number field with Always Validate Numeric Only validation requirements, even when casting using GetAsNumber().

Steps to reproduce the problem

Two tables, each with a single numeric field. One has no validation restriction; the other is set to Always Validate and Numeric Only. Manually enter a currency-like value in the first field (for example, "$5"). Use the following script to attempt to set the value in the second field.

Set Variable [ $myNumber; Value:GetAsNumber ( Table1::MyCurrency ) ]
Go to Layout [ “Table2” (Table2) ]
Set Field [ Table2::MyNumber; GetAsNumber ( $myNumber ) ]

Expected result

Field is set to "5".

Actual result

Field is not set because it supposedly does not meet validation requirements.

Exact text of any error message(s) that appear

Error 502 Number value does not meet validation entry options

Configuration information

While stepping through the script, copy the value from Data Viewer after the set variable step. It is possible to manually paste the value ("5") in the field and commit without a validation error.

May be related to http://forums.filemaker.com/posts/daabe4a9cf and PhilModJunk BugID 288, though the source field in this instance is a single value rather than a list.

Sample database available upon request—it sure would be convenient to be able to post it with this original report.

Workaround

Remove validation requirement.

Modify content of source field to remove non-numeric characters prior to running script.

Outcomes