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.  evalIf question

    Employee
    Posted 03-06-2013 08:46

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

    Originally posted by: aop

    Hi!

    I recently got to know evalIf function. I have succesfully used it for e.g conditional emit statements based on whether certain parameter is true or false. Now I would like to do similar thing but the condition in evalIf statement should be based on whether it is true (or false) that length of a list created from a parameter value (len(list({{^Param1^}})) > 1. Is this possible?


  • 2.  RE: evalIf question

    Employee
    Posted 03-06-2013 10:05

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

    Originally posted by: ltolleson

    The first parameter of the evalIf function must be a constant literal boolean value. It can be a literal TRUE|FALSE that comes from a boolean parameter or can be a constant value expression that produces a TRUE|FALSE. It cannot be a variable expression that produces either TRUE|FALSE.

    In this case you should use the If Then Else statement.

    value = if {{^Param1^}}.len() > 1 then <some value> else <alternate value>

    Thanks,
    Larry


  • 3.  RE: evalIf question

    Employee
    Posted 03-07-2013 02:00

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

    Originally posted by: aop

    I guess I would have needed evalIf as <some value> and <alternate value> are in my case emit statements with different field sets.