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.  Filtering strings with first letter?

    Employee
    Posted 05-17-2016 06:56

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

    Originally posted by: nikla

    Hello!
    New to Lavastorm, I have a column "KNPSTN" with a number of strings:
    MSTN042
    T040
    T028
    T070
    T070
    FSTN042
    FSRT43
    etc.

    I would like to filter it so that I only get the ones starting with the letter "T". I have tried using the node "split by search" but when I used it, it searched for Ts everywhere and not just for the first letter.

    Help would be much appreciated!


  • 2.  RE: Filtering strings with first letter?

    Employee
    Posted 05-17-2016 13:30

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

    Originally posted by: ryeh

    Try the following in a Filter node:

    emit *
    where KNPSTN.left(1) == "T"


  • 3.  RE: Filtering strings with first letter?

    Employee
    Posted 05-18-2016 06:29

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

    Originally posted by: Jaronowitz

    Hello,

    In addition to the previous answer, I would like to suggest the use one of the accelerator nodes designed to solve this type of filtering.
    The accelerator is called "Split by Substring" and it allows to split the input data in two, depending on whether the selected column contains the defined substring.

    For more information about Lavastorm Accelerator Library:
    http://community.lavastorm.com/threa...erator-Library
    Attachments:
    split by substring.brg


  • 4.  RE: Filtering strings with first letter?

    Employee
    Posted 05-22-2016 21:53

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

    Originally posted by: nikla

    Thank you guys for the help! I tried ryeh's solution to the problem and it worked out great! Will look into Jaronowitz solution as well.

    Kind regards
    nikla