The problem is that field and file numbers should be preceded by "#",
so you could have TOTAL(DETAILS:#2) or TOTAL(#3:#2), or I presume
TOTAL(DETAILS:CHARACTER COUNT). (I don't think I've tried using labels
with embedded spaces inside a computed expression before, so I'm not
100% sure it will work, but I think this syntax should be fine.

--- Kevin Toppenberg <[EMAIL PROTECTED]> wrote:

> Greg,
> 
> I'm back trying to get this working.  I appreciate the
> pointer to the right spot in the manual.
> 
> Here is the file I am trying to set up.  My goal is to
> have a grouping of transcribed documents.  I will
> supply the character count for each document, and the
> database will calculate the total character-count
> value for all the subdocuments.
> 
> File: TMG TRANSCRIPTION EVENT                         
>  
> REF  NODE;PIECE     FLD NUM  FIELD NAME
> ====================================================
>   1  0;1                .01  EVENT NAME          [RF]
>   2  0;2                  1  DATE                [D]
>   3  Computed             2  TOTAL CHARACTERS   [CJ8]
>      2;0                  3  DETAILS <-Mult [22710.03]
>   4   -0;1              .01   -DETAILS        [MNJ6,0]
>   5   -0;2                1   -DOCUMENT <-Pntr
> [P8925']
>   6   -0;3                2   -CHARACTER COUNT [NJ8,0]
>   7  0;4                  4  TRANSCRIBER  <-Pntr
> P200']
>  <> <> <>
> 
> In the computed field (field 2), I put the following
> expression: TOTAL(3:2)
> Here is the VPE dump of this field
> 
> -------------------------------------------------------
>   FIELD NAME:       TOTAL CHARACTERS
> 
>   FLD NUMBER:       2               FLD TITLE:
>   NODE;PIECE:       Computed       HELP FRAME:
> 
>       ACCESS:       RD:    DEL:    WR:
> 
>    DATA TYPE:       Computed
> 
>   CODE CREATING X:  S Y(22710,2,1)="" X
> ^DD(22710,2,9.5) S X=Y(22710,2,1)
> 
>   COMP. EXPRESSION: TOTAL(3:2)
> 
>   OVERFLOW EXECUTABLE CODE:
>       Node: 9.2     N Y S X="2"
>       Node: 9.3     F D=0:0 S
> (D,D1)=$O(^TMG(22710,D0,2,"B",DICOB,D)) Q:D'>0  I
> $D(^TMG(22710,D0,2,D,0))#2 S X=$P(^(0),U)  X
> ^DD(22710,2,9.2) S Y(22710,2,1)=Y(22710,2,1)+X
> Q:'$D(D)  S D=D1
>       Node: 9.4     S I(1)="""2""",J(1)=22710.03 N
> DICOB S DICOB="" F  S
> DICOB=$O(^TMG(22710,D0,2,"B",DICOB)) Q:DICOB=""   X
> ^DD(22710,2,9.3) Q:'$D(D)
>       Node: 9.5     S Y(22710,2,9.1,81)=$G(D1) X
> ^DD(22710,2,9.4):D0>0 S X="" S D1=Y(22710,2,9.1,81)
> 
>   DESCRIPTION:      This field will contain the total
> number of characters for the uploaded dictation
> (including spaces).
> 
> 
> I don't see what I am doing wrong.  Here is an example
> of it not working:
> 
> OUTPUT FROM WHAT FILE: TMG TRANSCRIPTION EVENT//
> Select TMG TRANSCRIPTION EVENT EVENT NAME:
> Toppenberg-Test
>          ...OK? Yes//   (Yes)
> 
> ANOTHER ONE:
> STANDARD CAPTIONED OUTPUT? Yes//   (Yes)
> Include COMPUTED fields:  (N/Y/R/B): NO// b  BOTH
> Computed Fields and Record Num
> ber (IEN)
> 
> NUMBER: 1                               
>   EVENT NAME: Toppenberg-Test
>   DATE: JAN 18, 2005    
>   TRANSCRIBER: TOPPENBERG,KEVIN S
>   DETAILS: 1                              
>     DOCUMENT: OFFICE VISIT
>     CHARACTER COUNT: 200
>   DETAILS: 2                              
>     DOCUMENT: OFFICE VISIT
>     CHARACTER COUNT: 345
>   TOTAL CHARACTERS (c): 4
> 
> 
> Select TMG TRANSCRIPTION EVENT EVENT NAME:
> 
> 
> Notice that 200+345 should = 545 characters, not the
> "4" that this value is coming back as.
> 
> Any ideas?
> Kevin
> 
> 
> 
> --- Greg Woodhouse <[EMAIL PROTECTED]> wrote:
> 
> > Check out the TOTAL function in the Fileman Advanced
> > User manual. You
> > can use functions in computed expressions, too.
> > 
> > --- Kevin Toppenberg <[EMAIL PROTECTED]> wrote:
> > 
> > > Greg (And Cameron), Thanks for your replies.
> > > 
> > > OK.  That seems easy enough.
> > > 
> > > I was going to ask if one could add up entries
> > from a
> > > multiple field, but decided that was getting too
> > > complicated.
> > > 
> > > Thanks
> > > Kevin
> > > 
> > > 
> > > --- Greg Woodhouse <[EMAIL PROTECTED]> wrote:
> > > 
> > > > Just use the option "Modify  File Attributes"
> > and
> > > > enter "C" for the
> > > > data type. You'll be prompted for a an
> > expression
> > > > (no X or Y needed) in
> > > > a pop-up window. You can just use the field
> > labels;
> > > > for example, if you
> > > > have numeric fields FIRST and SECOND and you
> > want
> > > > the computed field to
> > > > be their sum, just enter FIRST+SECOND (and then
> > be
> > > > sure to specify that
> > > > the computed field is numeric, rather than
> > string
> > > > valued, which is the
> > > > default.)
> > > > 
> > > > --- Kevin Toppenberg <[EMAIL PROTECTED]> wrote:
> > > > 
> > > > > Hey all,
> > > > > 
> > > > > I am setting up a simple file to track
> > > > transcription
> > > > > productivity numbers.
> > > > > 
> > > > > I will have a field that holds the number of
> > > > > characters were typed for a given event FIELD
> > 1.
> > > > > I want to have another field that calculates
> > > > "lines",
> > > > > which will be characters/60.  So I created, in
> > my
> > > > new
> > > > > file, a new field.  I made it to be a
> > calculated
> > > > > field.  It then asks me for the
> > 'COMPUTED-FIELD'
> > > > > EXPRESSION.  I am guessing I need to put my M
> > code
> > > > > here.
> > > > > 
> > > > > What I don't understand is whether I need to
> > set Y
> > > > or
> > > > > X to some value?  And how would I access the
> > value
> > > > in
> > > > > field 1?
> > > > > 
> > > > > Thanks
> > > > > Kevin
> > > > > 
> > > > > 
> > > > >               
> > > > > __________________________________ 
> > > > > Do you Yahoo!? 
> > > > > Yahoo! Mail - 250MB free storage. Do more.
> > Manage
> > > > less. 
> > > > > http://info.mail.yahoo.com/mail_250
> > > > > 
> > > > > 
> > > > >
> > > >
> > >
> >
> -------------------------------------------------------
> > > > > The SF.Net email is sponsored by: Beat the
> > > > post-holiday blues
> > > > > Get a FREE limited edition SourceForge.net
> > t-shirt
> > > > from ThinkGeek.
> > > > > It's fun and FREE -- well,
> > > > almost....http://www.thinkgeek.com/sfshirt
> > > > >
> > _______________________________________________
> > > > > Hardhats-members mailing list
> > > > > Hardhats-members@lists.sourceforge.net
> > > > >
> > > >
> > >
> >
> https://lists.sourceforge.net/lists/listinfo/hardhats-members
> > > > > 
> > > > 
> > > > 
> > > > =====
> > > > A practical man is a man who practices the
> > errors of
> > > > his forefathers. --Benjamin Disraeli
> > > > ====
> > > > Greg Woodhouse 
> > > > [EMAIL PROTECTED] 
> > > > [EMAIL PROTECTED] 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > >
> >
> -------------------------------------------------------
> > > > The SF.Net email is sponsored by: Beat the
> > > > post-holiday blues
> > > > Get a FREE limited edition SourceForge.net
> > t-shirt
> > > > from ThinkGeek.
> > > > It's fun and FREE -- well,
> > > > almost....http://www.thinkgeek.com/sfshirt
> > > > _______________________________________________
> > > > Hardhats-members mailing list
> > > > Hardhats-members@lists.sourceforge.net
> > > >
> > >
> >
> https://lists.sourceforge.net/lists/listinfo/hardhats-members
> > > > 
> > > 
> > > 
> > > 
> > >           
> > > __________________________________ 
> > > Do you Yahoo!? 
> > > All your favorites on one personal page – Try My
> > Yahoo!
> > > http://my.yahoo.com 
> > > 
> > > 
> > >
> >
> -------------------------------------------------------
> > > The SF.Net email is sponsored by: Beat the
> > post-holiday blues
> > > Get a FREE limited edition SourceForge.net t-shirt
> > from ThinkGeek.
> > > It's fun and FREE -- well,
> > almost....http://www.thinkgeek.com/sfshirt
> > > _______________________________________________
> > > Hardhats-members mailing list
> > > Hardhats-members@lists.sourceforge.net
> > >
> >
> https://lists.sourceforge.net/lists/listinfo/hardhats-members
> > > 
> > 
> > 
> > =====
> > A practical man is a man who practices the errors of
> > his forefathers. --Benjamin Disraeli
> > ====
> > Greg Woodhouse 
> > [EMAIL PROTECTED] 
> > [EMAIL PROTECTED] 
> > 
> > 
> > 
> > 
> > 
> >
> -------------------------------------------------------
> > The SF.Net email is sponsored by: Beat the
> > post-holiday blues
> > Get a FREE limited edition SourceForge.net t-shirt
> > from ThinkGeek.
> > It's fun and FREE -- well,
> > almost....http://www.thinkgeek.com/sfshirt
> > _______________________________________________
> > Hardhats-members mailing list
> > Hardhats-members@lists.sourceforge.net
> >
> https://lists.sourceforge.net/lists/listinfo/hardhats-members
> > 
> 
> 
> 
>               
> __________________________________ 
> Do you Yahoo!? 
> Read only the mail you want - Yahoo! Mail SpamGuard. 
> http://promotions.yahoo.com/new_mail 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive
> Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF,
> etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Hardhats-members mailing list
> Hardhats-members@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hardhats-members
> 


=====
A practical man is a man who practices the errors of his forefathers. 
--Benjamin Disraeli
====
Greg Woodhouse 
[EMAIL PROTECTED] 
[EMAIL PROTECTED] 





-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to