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.  Newbie To Lavastorm - TTB

    Employee
    Posted 08-10-2012 06:28

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

    Originally posted by: teesyc89

    Hi All,

    I am not very technical when it comes to syntax and the language used in Lavastorm and need some help replicating the length function in once of my graphs.

    I have created a filter node with two outputs and i need one of the outputs to include all information where the account number is <=6 characters long?

    Any help please?

    Thanks in advance

    Caz


  • 2.  RE: Newbie To Lavastorm - TTB

    Employee
    Posted 08-10-2012 06:35

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

    Originally posted by: Tim Meagher

    Hi,

    Assuming that your account number is in a field called "Account", and it is a string field, the simplest way to do this is using a Split node, and just entering the following in the "PredicateExpr" field:
    'Account'.strlen() <= 6
    If this is an integer field, you'll need to convert it to a string first using
     str('Account')
    If you need to more than just split the data and want to use a filter node, then you should have something like:

    smallLength = 'Account'.strlen() <= 6
    
    output 1 {
     emit <things to emit>
     where smallLength
    }
    
    output 2 {
      emit <things to emit>
      where not smallLength
    }