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


Groups > comp.databases.filemaker > #2673

Re: Script to Increment an arbitrary Field

Path csiph.com!aioe.org!.POSTED!not-for-mail
From Helpful Harry <HelpfulHarry@BusyWorking.com>
Newsgroups comp.databases.filemaker
Subject Re: Script to Increment an arbitrary Field
Date Sat, 13 Aug 2016 09:48:38 +1200
Organization Aioe.org NNTP Server
Lines 61
Message-ID <130820160948389357%HelpfulHarry@BusyWorking.com> (permalink)
References <0001HW.D3CFA2020811C44BB02919BF@news.astraweb.com> <100820160859573113%HelpfulHarry@BusyWorking.com> <0001HW.D3D0C7E30856A47BB01029BF@news.astraweb.com> <1mrt89w.k4rd3u1cxowv4N%clkaufmann@gmx.ch> <b0550$57ac2e9e$53559afc$20447@news.ziggo.nl> <0001HW.D3D31AC308E20FE2B02919BF@news.astraweb.com> <nokaur$2ir$1@dont-email.me> <0001HW.D3D34D2D08EDE0D2B01029BF@news.astraweb.com>
NNTP-Posting-Host haD+OImfFYRQ16ABS7oirw.user.gioia.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 8bit
X-Complaints-To abuse@aioe.org
User-Agent Thoth/1.8.4 (Carbon/OS X)
X-Notice Filtered by postfilter v. 0.8.2
X-Face vIZzK[X\z-._]-_:U?l@cBtwg<{a>ggn\mH}Vs>38E,#R%7h%U0'=4;1Q=erO %[T#a{YJfGvAbWmE@f_h]<rQ30+q;vqA^FUVx%\9{@r{gt${p^.L~bemFF@WY$r9fhuA F"1)$0+MgN+j8OO<SAec%$P;!M4Aj/kVitK5\xKmed-/3$2LiT1nI!-lKjt0B!qP_E{V ja+\#+[_uq8",IkoIF3M0}}qCD(&
Xref csiph.com comp.databases.filemaker:2673

Show key headers only | View raw


In article <0001HW.D3D34D2D08EDE0D2B01029BF@news.astraweb.com>, Nelson
<nelson@nowhere.com> wrote:
> On Fri, 12 Aug 2016 07:12:26 -0400, ursus wrote
> (in article <nokaur$2ir$1@dont-email.me>):
> >>>
> >>> PseudoPseudoCode
> >>> You number your fields (instead of naming them field1 _ fieldx) just 1
> >>> and 2 etc.
> >>> GetFieldName as number
> >>> SetField(number+1) as NewValue
> >> 
> >> The problem is that the button doesn't activate the associated field so
> >> any of the functions which operate on the active field such as
> >> GetFieldName or GetFieldName as number don't reference the desired
> >> field.
> > 
> > The button can be named as well. BUt why do you need a field to act as a 
> > button in the first place? If it is because you need to see the contents 
> > of the field on the button then there are other ways to accomplish that. 
> > like create and name a button. then put your field on top if it. Group 
> > them and assign a script to the group. parse the name of the button to 
> > the script as a variable.
> 
> I have several fields which are just counters starting at 0.  I want 
> them to increment when I click on them rather than have to manually 
> enter the next integer.  I could use a script trigger like "On Object 
> Enter", but that wouldn't allow me to change my mind or decrement the 
> field.  Plus I could make the field active accidentally.
> 
> The way I have it set up now, the field is formatted as a button.  
> Clicking on it increments the value, Option-Clicking on it decrements 
> the value.  Works for me.  The script associated with the button has to 
> have the field name hard coded into it so I have to have a different 
> script for each counter.  Putting a button next to the field just 
> clutters up the interface and that button has the same issue of needing 
> the field name.

Having a Field as a Button (or a Button layered over Field) is that you
then can't click into the Field itself.

Either your Script will also need to select the Field or you'll need a
second copy of the Field (perhaps on a different Layout) that can be
clicked into so that you can manually edit the data if needed. 

That's why it's usually best to have something like a "+" and "-"
Button next to the Field or, depending on how it's used, automating the
increment as an auto-enter Field or Script associated with a function
(e.g. "New Record").



> Not a big deal but I was looking for some sort of generic solution.

I think the only way is to pass the Field name as a parameter, which
means hardcoding the Field names into the Button definitions ... but
since they're attached to the appropriate Button / Field anyway, I
don't think that matters too much (as long as you remember to change it
if you duplicate a Field / Button and change which Field it uses).


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