Results 1 to 4 of 4

Thread: Converting Field rule from A4 to A5

  1. #1
    Member
    Real Name
    David Pugh
    Join Date
    Jun 2008
    Location
    Orlando FL
    Posts
    2

    Default Converting Field rule from A4 to A5

    Converting from Alpha4, V7 to Alpha5, V9. Need help in converting this field rule.

    Parent=OP_CKHDR
    Field Type Width Decimal Places

    1. NUMBER C 8
    2. DATE D 8
    3. BILLCODE C 10
    4. NAME C 40
    5. AMOUNT N 10 2

    Child=DETAIL
    Field Type Width Decimal Places
    2. NUMBER C 8
    9. ACCTCODE C 15
    10. DESC C 40
    11. TAXABLE C 1
    12. AMOUNT1 N 8 2

    Field rule forOP_CKHDR->AMOUNT (Field 5)
    Type : Numeric
    Value : Summary
    Summary of : DETAIL->AMOUNT1
    Summary function : Total
    Ignore Mode : None
    Posting : Yes
    Auto Advance : No

    Tried total(Ck_Detail->Amount1,grp->ckhdr) and it works in the Expresion Builder but get the following error when I try to save.
    "Cannot use function in this context" I need this value stored in the Parent Amount field.
    Thank you in advance.

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    21,242

    Default Re: Converting Field rule from A4 to A5

    This function is a report writer function, not intended for table level field rules or other expressions. While the function may perform in some areas outside of the report writer, its use there is not supported.
    You'll have to convert to a tablesum() or dbsum() expression.

    I can't tell if your child table is "Detail" or CK_Detail".

    Try
    tablesum("Ck_Detail","Number = "+quote(Number),"Amount1")
    or
    tablesum("Detail","Number = "+quote(Number),"Amount1")

    ass appropriate.
    Last edited by Stan Mathews; 01-20-2012 at 03:41 PM.

  3. #3
    Member
    Real Name
    David Pugh
    Join Date
    Jun 2008
    Location
    Orlando FL
    Posts
    2

    Default Re: Converting Field rule from A4 to A5

    Thanks for the help. Think my problem was my child was named Ck-detail. I renamed to Ck_detail and it works. Alpha must not like the -.

  4. #4
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    21,242

    Default Re: Converting Field rule from A4 to A5

    Alpha must not like the -.
    Indeed not. How would Alpha decide if you were subtracting the values in two fields/tables or referring to a hypenated table name? Best to refrain from using punctuation in a name, underscores if you feel you must punctuate.

Similar Threads

  1. Field Rule lookup() not working?? Looking up character field from another table
    By joannristau in forum Alpha Five Version 10 - Desktop Applications
    Replies: 6
    Last Post: 01-11-2011, 03:40 PM
  2. Converting field of type Time to Character
    By Rhett Scott in forum Alpha Five Version 9 - Desktop Applications
    Replies: 1
    Last Post: 08-11-2009, 01:01 AM
  3. Converting old Action Scripts in Field Rules
    By MoGrace in forum Alpha Five Version 7
    Replies: 0
    Last Post: 05-10-2008, 06:54 PM
  4. Replies: 1
    Last Post: 01-24-2006, 02:15 PM
  5. Converting character to a date field?
    By Howard Berg in forum Alpha Five Version 4
    Replies: 14
    Last Post: 05-11-2000, 06:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

The Reviews Are In...

It just is revolutionary and reminds me of VB and how it changed the world.
quote Robert Scoble, Scobleizer

...Version 10 is a turning point on how developers will be writing applications for the web
quote Alan Ashendorf, Lets Talk Computers

Alpha Five version 10... this version is really a break-through for web developers.
quote The Wall Street Journal, Digital Network

Our Professional Services Division

Training and Mentoring - Alpha Software's Professional Services division is here to help. We offer mentoring and training services, for those who need guidance or advice building their own applications.

Development Services - Need someone to build your application? We'll get the job done right. We have an in-house team of Alpha Five developers and a network of carefully selected artists, designers and IT professionals ready to handle projects of any size. Read more .

submit a project request

Alpha Five Awards & Press
awards
Products Store Support Services About Cart Site Map Resources Home
© Copyright 2000-2011 Alpha Software, Inc. 70 Blanchard Road Burlington, MA 01803 781.229.4500
more