Ask a Question related to FileMaker, Design and Development.

  1. #1

    Default Conditional sum?

    FMP6, MacOSX.2

    I've created a calc field using the aggregate Sum(score) to give me a "total
    points scored" for all related records in a self-join. I then created a
    checkbox that, if checked, I want the score from that particular record
    omitted from the Sum calc (but I want the score preserved so I can't have
    the checkbox zero out the score field). Is this possible?

    The only way I can think of seems clunky: create scoreForSum calc =
    Case(omit = "true","",score)

    I would then use Sum(scoreForSum) to obtain "total points scored".


    As I said, it seems clunky with the extra field, so I was wondering if there
    is a better way.

    TIA,

    Fred

    Fred Guest

  2. Similar Questions and Discussions

    1. conditional format
      Hi, Using A2K, Can anyone tell me if there is a way of using Conditional Formatting to highlight the current record in a continous form (i.e....
    2. Conditional query
      <CFQUERY NAME='qGetDetailThumbs' DATASOURCE='va_db'> Select hotelId, name, supplier, url, thumbnailurl FROM hotel_images WHERE hotelId =...
    3. Conditional compilation
      I am writing a Perl script which will run on multiple machines. I have a use Expect; in the script. The problem is that Perl Expect is not...
    4. Conditional Value Lists
      While browsing the Techinfo database on the web for the contents of the FileMaker Developer CD, I encoutered a folder describing an example of...
    5. Conditional Constraint?
      As soon as you start doing conditional constraints, you're talking business logic. At which point, your attention invariably should turn the way of...
  3. #2

    Default Re: Conditional sum?

    That's pretty much it.

    If the checkbox is formatted with a VL whose contents are 1 and 0 (or even
    1), and you squish it to show only the 1 part, and it's a number field, you
    can shorten to:

    omit*score

    --
    John Weinshel
    Datagrace
    Vashon Island, WA
    (206) 463-1634
    Associate Member, Filemaker Solutions Alliance


    "Fred" <fredr1@cox.net> wrote in message
    news:BBC322C8.C65B%fredr1@cox.net...
    > FMP6, MacOSX.2
    >
    > I've created a calc field using the aggregate Sum(score) to give me a
    "total
    > points scored" for all related records in a self-join. I then created a
    > checkbox that, if checked, I want the score from that particular record
    > omitted from the Sum calc (but I want the score preserved so I can't have
    > the checkbox zero out the score field). Is this possible?
    >
    > The only way I can think of seems clunky: create scoreForSum calc =
    > Case(omit = "true","",score)
    >
    > I would then use Sum(scoreForSum) to obtain "total points scored".
    >
    >
    > As I said, it seems clunky with the extra field, so I was wondering if
    there
    > is a better way.
    >
    > TIA,
    >
    > Fred
    >

    John Weinshel Guest

  4. #3

    Default Re: Conditional sum?

    I think that should be:

    (not omit) * score

    assuming that checking the box means omit = 1 and you don't want to count it
    in your sum.

    "John Weinshel" <john@datagrace.biz> wrote in message
    news:vprr5q496i3u42@news.supernews.com...
    > That's pretty much it.
    >
    > If the checkbox is formatted with a VL whose contents are 1 and 0 (or even
    > 1), and you squish it to show only the 1 part, and it's a number field,
    you
    > can shorten to:
    >
    > omit*score
    >
    > --
    > John Weinshel
    > Datagrace
    > Vashon Island, WA
    > (206) 463-1634
    > Associate Member, Filemaker Solutions Alliance
    >
    >
    > "Fred" <fredr1@cox.net> wrote in message
    > news:BBC322C8.C65B%fredr1@cox.net...
    > > FMP6, MacOSX.2
    > >
    > > I've created a calc field using the aggregate Sum(score) to give me a
    > "total
    > > points scored" for all related records in a self-join. I then created a
    > > checkbox that, if checked, I want the score from that particular record
    > > omitted from the Sum calc (but I want the score preserved so I can't
    have
    > > the checkbox zero out the score field). Is this possible?
    > >
    > > The only way I can think of seems clunky: create scoreForSum calc =
    > > Case(omit = "true","",score)
    > >
    > > I would then use Sum(scoreForSum) to obtain "total points scored".
    > >
    > >
    > > As I said, it seems clunky with the extra field, so I was wondering if
    > there
    > > is a better way.
    > >
    > > TIA,
    > >
    > > Fred
    > >
    >
    >

    Glenn Schwandt Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139