Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Helpful Harry Newsgroups: comp.databases.filemaker Subject: Re: Scripting: Putting the Cursor into a Specific Field Date: Sun, 28 Oct 2018 18:13:24 +1300 Organization: Aioe.org NNTP Server Lines: 46 Message-ID: References: <1nx0y5j.3xtd161uvtfy1N%csampson@inetworld.net> <1nx2zwi.11xzs38gew5uwN%csampson@inetworld.net> <1nxakf2.12dghzr6wj5kvN%csampson@inetworld.net> NNTP-Posting-Host: TKIl7vuLMRpiks7/3DBu1g.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Unison/2.2 X-Notice: Filtered by postfilter v. 0.8.3 Xref: csiph.com comp.databases.filemaker:3227 On 2018-10-27 14:38:16 +0000, none@gmail.com said: >>> >>> Perhaps it would help if you explain why you're trying to achieve this. >>> There might be a better approach to doing what you want. >> >> Thanks again, Harry. It's going to take me a while to digest all this. >> >> What I'm trying to do: I have a script that validates input that's >> supposed to be money. It catches every error I could think of and >> informs the user, using a custom dialog. At present, the custom dialog >> has only an OK button. After clicking on this button, the user has to >> click in the field again to fix the error(s). I'd like to modify this so >> the custom dialog has Fix and Accept buttons, with clicking on the Fix >> button resulting in the cursor being in the erroneous field. >> >> One problem with my current script, which I consider better than >> nothing, is that upon exiting the money field, which is just a number >> field to FM, FM displays the erroneous data using its wildly lax >> interpretation of the input. The result is that no particular error is >> obvious, unless the user notices that the value in the field is not what >> he wanted. >> >> The reason for wanting an Accept button is another story. >> >> Charlie > > Have you tried the automatic field validation FMP offers? Make a number > field. Goto field options. Choose the second tab (I don't know its > English name). On this tab set the checkmark on to 'Restrict......' > (again exact name unknown to me in English) Then from the dropdown > behind the checkmark choose numeric only. > OR if you want something more complec, choose 'Through calculation'. > Then set the last checkmark and create your custom warning. > No scripts, no triggers. Should work???? > > keep well, Erik Probably the main difference is that with the in-built Validation only gives you one error messages, while the Scripted method means you can have a more precise error message - a different message for each type of error. Helpful Harry :o)