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


Groups > comp.databases.filemaker > #2665

Re: Script to Increment an arbitrary Field

From Helpful Harry <HelpfulHarry@BusyWorking.com>
Newsgroups comp.databases.filemaker
Subject Re: Script to Increment an arbitrary Field
Date 2016-08-10 08:59 +1200
Organization Aioe.org NNTP Server
Message-ID <100820160859573113%HelpfulHarry@BusyWorking.com> (permalink)
References <0001HW.D3CFA2020811C44BB02919BF@news.astraweb.com>

Show all headers | View raw


In article <0001HW.D3CFA2020811C44BB02919BF@news.astraweb.com>, Nelson
<nelson@nowhere.com> wrote:
> 
> I'd like to format a field as a button which when clicked will 
> increment the underlying field by one. I can see how to do it if I 
> specify the field to be incremented.  I can't figure out how to make a 
> generic script to do this which I can apply to an arbitrary field.  The 
> problem is that hovering over the button doesn't make the corresponding 
> field active.
> 
> Any ideas how to do this?

It may depend on the version of FileMaker Pro you're using.

In early versions it simple isn't possible. You would have to create a
separate Button and Script for each Field.

In newer versions you can use Script Parameters to pass which Button
has been clicked to the Script, but you may still need a set of "If
Then" statements to work out which Field to increment from the
Parameter. I haven't got any way to check, but if you set that
Parameter from each Button as the Field's actual name, then you MIGHT
be able to use one command along the lines of:
    Set Field [ Get(ScriptParameter); Get(ScriptParameter) + 1]


BUT,
clicking the Field to increment its value is not a very good usability
design since it's far too easy to click the wrong Field by accident.
You're probably better off with a set of "+" and "-" Buttons next to
each Field so the user can both increment and decrement the Field's
value.

Helpful Harry  :o)

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


Thread

Script to Increment an arbitrary Field Nelson <nelson@nowhere.com> - 2016-08-09 15:06 -0400
  Re: Script to Increment an arbitrary Field Helpful Harry <HelpfulHarry@BusyWorking.com> - 2016-08-10 08:59 +1200
    Re: Script to Increment an arbitrary Field Nelson <nelson@nowhere.com> - 2016-08-10 12:00 -0400
      Re: Script to Increment an arbitrary Field clkaufmann@gmx.ch (Christoph Kaufmann) - 2016-08-11 09:19 +0200
        Re: Script to Increment an arbitrary Field Ursus <ursus.kirk@ziggo.nl> - 2016-08-11 09:51 +0200
          Re: Script to Increment an arbitrary Field Nelson <nelson@nowhere.com> - 2016-08-12 06:18 -0400
            Re: Script to Increment an arbitrary Field ursus <ursus.kirk@gmail.com> - 2016-08-12 13:12 +0200
              Re: Script to Increment an arbitrary Field Nelson <nelson@nowhere.com> - 2016-08-12 09:53 -0400
                Re: Script to Increment an arbitrary Field Helpful Harry <HelpfulHarry@BusyWorking.com> - 2016-08-13 09:48 +1200
                Re: Script to Increment an arbitrary Field Martin Τrautmann <t-usenet@gmx.net> - 2016-08-14 12:56 +0000
        Re: Script to Increment an arbitrary Field Nelson <nelson@nowhere.com> - 2016-08-12 06:14 -0400
          Re: Script to Increment an arbitrary Field clkaufmann@gmx.ch (Christoph Kaufmann) - 2016-08-14 20:51 +0200

csiph-web