Alpha DevCon 2018
Results 1 to 3 of 3

Thread: Calculation too long

  1. #1
    Member trackmanpete's Avatar
    Real Name
    Pete Schuder
    Join Date
    Sep 2005
    Location
    Mansfield, MA
    Posts
    592

    Default Calculation too long

    I am still learning Alpha, so please bear with me. In my reports I am grouping by States and would like to have group header with full state name. My field is 2 letter abbreviation of state. I tried calc field
    Code:
    longstate=case(St="CA","California)
    By the time I got to the 46th state I ran out of room (1024). I read some other posts about creating "user defined functions", but can't figure out how to do that. I saw a function CSTATE_ABREVLOOKUP(), but would like the reverse, which I could not find.

    Thanks,

    Pete

  2. #2
    Member trackmanpete's Avatar
    Real Name
    Pete Schuder
    Join Date
    Sep 2005
    Location
    Mansfield, MA
    Posts
    592

    Default Never mind....

    A little more looking and I found CState(). Have a great holiday, everyone!

  3. #3
    Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,431

    Default or use a set

    Pete

    This is also where a set with a table of state codes and names would work well.

    So for the next time you run into something like this, try using a set.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

Similar Threads

  1. chr(0) should still be 1 character long
    By Antony in forum Web Application Server v6
    Replies: 14
    Last Post: 10-16-2011, 03:47 AM
  2. Long merged documents?
    By DickJames in forum Alpha Five Version 6
    Replies: 9
    Last Post: 07-03-2005, 09:21 AM
  3. Export takes way too long
    By Raymond Lyons in forum Alpha Five Version 6
    Replies: 16
    Last Post: 02-16-2005, 06:18 PM

Posting Permissions

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