LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Weekday function not recognized.

    Employee
    Posted 01-22-2010 17:42

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: leekennett

    I have the following code in a filter to output a calculated field.

    CMPDT = if (NUM_DAY > 0)
    then (if (weekday('CRIS_Service_Order.INPUT_DATE') == 5)
    then (addDate(addDate('CRIS_Service_Order.INPUT_DATE',1 ),NUM_DAY))
    else if (weekday('CRIS_Service_Order.INPUT_DATE') == 4)
    then (addDate(addDate('CRIS_Service_Order.INPUT_DATE',2 ),NUM_DAY))
    else (addDate('CRIS_Service_Order.INPUT_DATE',NUM_DAY)) )
    else (addDate('CRIS_Service_Order.INPUT_DATE',NUM_DAY))

    When I try to run the filter it errors out saying :

    ERROR initializing expert output:
    unrecognized token: 'weekday'

    Installing log (01/22/2010 17:35:11) ...
    2010-01-22 17:35:11; Level: 2; Type: 0; Desc: "unrecognized token: 'weekday'"; File: "./../code/source/expert/Expr.cpp"; Line: 125; Context: "Salmon::NED::Expr::tryParseCombination()"
    2010-01-22 17:35:11; Level: 2; Type: 0; Desc: "...in expression starting on line 243"; File: "./../code/source/expert/Expr.cpp"; Line: 89; Context: "Expr::parseExpr()"
    2010-01-22 17:35:11; Level: 2; Type: 0; Desc: "...in expression starting on line 243"; File: "./../code/source/expert/Expr.cpp"; Line: 89; Context: "Expr::parseExpr()"
    2010-01-22 17:35:11; Level: 2; Type: 0; Desc: "...in expression starting on line 243"; File: "./../code/source/expert/Expr.cpp"; Line: 89; Context: "Expr::parseExpr()"
    2010-01-22 17:35:11; Level: 2; Type: 0; Desc: "...in expression starting on line 242"; File: "./../code/source/expert/Expr.cpp"; Line: 89; Context: "Expr::parseExpr()"
    2010-01-22 17:35:11; Level: 2; Type: 0; Desc: "...in statement starting on line 242"; File: "./../code/source/expert/ExprStatement.cpp"; Line: 158; Context: "Salmon::NED::Statement_Expr::tryParseStatemen t()"
    2010-01-22 17:35:11; Level: 2; Type: 0; Desc: "...in expression starting on line 242"; File: "./../code/source/expert/Expr.cpp"; Line: 89; Context: "Expr::parseExpr()"
    2010-01-22 17:35:11; Level: 2; Type: 0; Desc: "...handling expression #12 in file"; File: "./../code/source/brain/ExprTableIo.cpp"; Line: 86; Context: "Salmon::NED::ExprTableIo::initialize()"
    2010-01-22 17:35:11; Level: 2; Type: 0; Desc: "...exception seen"; File: "./../code/source/brain/NodeControl.cpp"; Line: 1057; Context: "Salmon::NED::NodeControl::initializeExpert()"
    Uninstalling log (01/22/2010 17:35:11) ...

    Any suggestions?


  • 2.  RE: Weekday function not recognized.

    Employee
    Posted 01-25-2010 08:28

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: timonk

    Good Day,

    Generally that kind of an error means one of 2 things: a language keyword being used somewhere innappropriate where it cannot be interpreted correctly. Or the graph is being run against a lower server version that doesn't recoginze the keyword.

    The 'weekday' keyword was introduced in 4.1.5.

    Are you running against a backend unix server? If so:
    Are you certain the version is at least 4.1.5?

    If this is the LAE Desktop version, did you:
    Install the full BRAIN 4.1.5.exe ?
    Do you have more than one version of LAE Desktop installed in parrallel, and if so are you sure the 4.1.5 localhost is the one running?

    I put together a quick test, and looked over your usage, and it looks okay.

    Regards
    Timon Koufopoulos,
    MDA Support.