Alpha Video Training
Results 1 to 6 of 6

Thread: IF THEN ELSE in expression builder

  1. #1
    Luc Verlee
    Guest

    Default IF THEN ELSE in expression builder

    I'm completely new to A5.
    Based on a field "DATE" I want to have the name of the day of that particular date to appear in a calculated field called "name_of_the_day". In field rules of "name_of_the_day" I use the expression builder to CDOW(DATE) which produces correctly the name. Okay so far.
    But then I want to translate the name of the day into another language e.g "Monday" to "Lundi" . So I thought to put after the CDOW(DATE)expression an IF THEN expression something like IF DATE="Monday" THEN DATE="Lundi"
    but I seem to miss the correct expression. Searched the manuals but cannot find anything.
    Can somebody point out the correct expression and where to look in the manuals ? Thx

  2. #2
    Vince McGinnis
    Guest

    Default RE: IF THEN ELSE in expression builder

    Luc

    I would look a two functions in particular.

    These can be found in the functions and expressions (PDF)book.

    Look at:

    cdow()

    this returns the day of the week

    also look at:

    CASE() function

    to wook out the logic

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

    Default RE: IF THEN ELSE in expression builder

    Luc

    Found this with a search.

    http://msgboard.alphasoftware.com/alphaphorum/read.php3?sortby=lastreply&direction=desc&num=11&id=49248&thread=49246

    Took a chance at making a function of it.

    Take the attached file, save it, and use the code import. Control panel - code tab - code (on menu) - import. Follow the dialogs to import the one function. It will create a function that you provide the numeric day of the week and you'll get the day of the week in french.

    You'll now have a function that you can use like:

    jours(1) or jours(dow(date()))

  4. #4
    Luc Verlee
    Guest

    Default RE: IF THEN ELSE in expression builder

    Thx Vince !

  5. #5
    Luc Verlee
    Guest

    Default RE: IF THEN ELSE in expression builder

    Thanks Al ,

    Just great ! Didn't know it could be done that way. So once this function exists it can be used in whatever database.
    Think I have a long way ahead studying !

  6. #6
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,628

    Default RE: IF THEN ELSE in expression builder

    Luc

    You stated:
    So once this function exists it can be used in whatever database.

    My reply:
    Just to be clear, you can use this in the database that it is imported to.

    You can import this into any other database or you can learn about the .aex files to make it available on any database for one Alpha 5 installation.


Similar Threads

  1. expression builder
    By John Burke in forum Alpha Five Version 6
    Replies: 1
    Last Post: 08-06-2004, 07:57 AM
  2. Expression Builder
    By Bob Whitaker in forum Alpha Five Version 5
    Replies: 2
    Last Post: 01-16-2004, 03:15 AM
  3. Expression Builder
    By Scott Rusoff in forum Alpha Five Version 5
    Replies: 2
    Last Post: 01-17-2003, 08:41 AM
  4. Using the expression builder
    By Jim Dompier in forum Alpha Five Version 4
    Replies: 6
    Last Post: 10-23-2001, 07:55 AM
  5. expression builder
    By eric bellingham in forum Alpha Five Version 4
    Replies: 1
    Last Post: 01-06-2001, 03:24 PM

Bookmarks

Posting Permissions

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