Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.filemaker > #3063

Re: Validating Currency Entries

Newsgroups comp.databases.filemaker
Subject Re: Validating Currency Entries
From csampson@inetworld.net (Charles H. Sampson)
Date 2018-03-07 12:50 -0800
Message-ID <1nlam0d.gdd36gd28prqN%csampson@inetworld.net> (permalink)
References (2 earlier) <1nkmsq6.10qkq5trc94fbN%csampson@inetworld.net> <1nkq7kr.1seqsot19ianmfN%csampson@inetworld.net> <p6tgf5$18bj$1@gioia.aioe.org> <1nl40c9.1tjeh52nv4ubvN%csampson@inetworld.net> <p7go0p$hhj$1@dont-email.me>

Show all headers | View raw


<ursus.kirk@gmail.com> wrote:

> Op 4-3-2018 om 08:34 schreef Charles H. Sampson:
> > Helpful Harry <HelpfulHarry@BusyWorking.com> wrote:
> > 
> >> On 2018-02-25 02:16:59 +0000, Charles H. Sampson said:
> >>> Charles H. Sampson <csampson@inetworld.net> wrote:
> >>>>
> >>>> Here's what I think will work for me. I can write a pretty simple script
> >>>> that will make sure that only a correct value is entered. I then attach
> >>>> that script to the "exit field" event. The beauty part is that I can
> >>>> easly import that script into any data base and use it to validate all
> >>>> the currency fields of that data base. I'll let you know how that works.
> >>>
> >>> And it works like a champ. I took a bit of time because I had to code it
> >>> brute force; finite state machines are hard to implement in FMP's script
> >>> language. I added several filips. For example, if invalid characters are
> >>> entered, they are displayed one-by-one (in a single error message
> >>> dialog) with their positions in the string. That's the kind of nonsense
> >>> I do when I get carried away, when the fit is upon me, as I've said in
> >>> the past.
> >>>
> >>> There's only one thing I wanted to do that I haven't figured out yet.
> >>> Based on the user's response to the error message, I wanted to either
> >>> simply put the cursor in the incorrect data, as entered, or I wanted to
> >>> clear the field and put the cursor there. In my extensive testing, this
> >>> doesn't seem to be a big deal.
> >>
> >> You can't position the text cursor at a certain point inside a Field's
> >> data (although there may be a plug-in that can). The only thing you can
> >> do is use the "Go To Field [Fieldname]", with the option of either
> >> selecting all the Field's data value or none of it.
> >>
> >> There is the Set Selection command which could select the (first)
> >> error, but that would only highlight one error and be a painful
> >> approach if there are multiple errors.
> >>
> >> You could use the formatting comamnds within a Set Field command to
> >> highlight the errors in a different colour / style, but the colour /
> >> style will probably stay after the user corrects it (at least until the
> >> error check was performed again which could clear all extra error
> >> formatting).
> > 
> > All good points and I essentially agree. If you validate a field by
> > calculation and the validation fails, the user is presented with a
> > message whose two responses are "Revert Record" and "OK". "OK" leaves
> > the contents alone and places the cursor at the end of that field;
> > "Revert Record" clears the whole record — after getting a confirmation —
> > and places the cursor in the first field. Something like that is what I
> > hoped to immitate, maybe a little friendlier. I'm not sure clearing the
> > whole record is a good idea.
> > 
> >> Clearing the Field's data isn't a good idea. Not only is the user
> >> unable to see what the problem was, they also have to re-enter the
> >> whole thing.
> > 
> > Right. Yet that's what FileMaker does.
> > 
> > I'm stuck right now because I don't know how to get to the field that
> > has the error. I think I saw something about that when poking around in
> > the on-line documentation but I foolishly didn't write it down.
> > 
> Charlie,
> Did you ever read my contribution about validating numbers in filemaker
> on comp.databases.filemaker? I'm sure at least part of it is usuable.
> And it does result in a value where the user can see what he/she has 
> done different to the requirements. And fixes any errors that might have
> been made while entering the value.

How can I find this contribution, Erik? I'd be most interested in
reading what you have to say on the subject.

However, I don't believe in fixing user errors. I don't want my programs
to do a lot of computing and spit out results that might be based on
incorrect input, particularly if the inputter isn't aware that he made
an input mistake.

Charlie
-- 
Nobody in this country got rich on his own.  You built a factory--good.
But you moved your goods on roads we all paid for.  You hired workers we
all paid to educate. So keep a big hunk of the money from your factory.
But take a hunk and pay it forward.  Elizabeth Warren (paraphrased)

Back to comp.databases.filemaker | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Validating Currency Entries csampson@inetworld.net (Charles H. Sampson) - 2018-02-21 19:05 -0800
  Re: Validating Currency Entries Helpful Harry <HelpfulHarry@BusyWorking.com> - 2018-02-22 19:43 +1300
    Re: Validating Currency Entries csampson@inetworld.net (Charles H. Sampson) - 2018-02-22 16:26 -0800
      Re: Validating Currency Entries Helpful Harry <HelpfulHarry@BusyWorking.com> - 2018-02-23 15:19 +1300
        Re: Validating Currency Entries csampson@inetworld.net (Charles H. Sampson) - 2018-02-24 18:16 -0800
      Re: Validating Currency Entries csampson@inetworld.net (Charles H. Sampson) - 2018-02-24 18:16 -0800
        Re: Validating Currency Entries Helpful Harry <HelpfulHarry@BusyWorking.com> - 2018-02-25 18:09 +1300
          Re: Validating Currency Entries csampson@inetworld.net (Charles H. Sampson) - 2018-03-03 23:34 -0800
            Re: Validating Currency Entries ursus.kirk@gmail.com - 2018-03-04 13:15 +0100
              Re: Validating Currency Entries csampson@inetworld.net (Charles H. Sampson) - 2018-03-07 12:50 -0800
                Re: Validating Currency Entries ursus.kirk@gmail.com - 2018-03-08 09:54 +0100
                Re: Validating Currency Entries csampson@inetworld.net (Charles H. Sampson) - 2018-03-11 18:15 -0700
            Re: Validating Currency Entries Howard Schlossberg <howard@nospam.fmprosolutions.com> - 2018-03-04 10:24 -0800
              Re: Validating Currency Entries csampson@inetworld.net (Charles H. Sampson) - 2018-03-07 12:50 -0800
  Re: Validating Currency Entries Erik Appeldoorn <ursus.kirk@gmail.com> - 2018-02-22 09:18 +0100
  Re: Validating Currency Entries Martin Τrautmann <t-usenet@gmx.net> - 2018-03-08 13:19 +0000
    Re: Validating Currency Entries csampson@inetworld.net (Charles H. Sampson) - 2018-03-11 18:15 -0700

csiph-web