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.  Using "in" within a filter node

    Employee
    Posted 01-04-2016 06:40

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

    Originally posted by: JAWILBUR

    Hello

    I am using a filter node to pull certain records. How do I use something similar to a "in" command within the node?

    output 1
    {
    emit *
    where
    VIP_FLG_SBB == "C"
    and DWELL_TYP_HSE in ("DL","BP","CM","WC","BL","HC","HA","DM","CL")
    and CommercialServiceCode == "C"
    and HospitalityServiceCode == ""
    }

    Thanks


  • 2.  RE: Using "in" within a filter node

    Employee
    Posted 01-04-2016 07:42

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

    Originally posted by: stonysmith

    The easiest way is to flip it around and use strFind()

    where strFind("DL,BP,CM,WC,BL,HC,HA,DM,CL",DWELL_TYP_HSE ) > -1

    Just be sure that DWELL_TYP_HSE is never a singe character like an "M" or you'll get invalid results.


  • 3.  RE: Using "in" within a filter node

    Employee
    Posted 01-04-2016 07:51

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

    Originally posted by: JAWILBUR

    Great Thanks Stony.


  • 4.  RE: Using "in" within a filter node

    Employee
    Posted 01-05-2016 07:52

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

    Originally posted by: JAWILBUR

    I have changed to strFind but the node ends up erroring without a message.

    output 1
    {
    emit *
    where strFind("DL,BP,CM,WC,BL,HC,HA,DM,CL",DWELL_TYP_HSE ) > -1
    and VIP_FLG_SBB == "C"
    and CommercialServiceCode == "C"
    and HospitalityServiceCode == ""
    }

    output 2
    {
    emit *
    where strFind("CF,BF,DF",DWELL_TYP_HSE) > -1
    and VIP_FLG_SBB == "B"
    and CommercialServiceCode == ""
    and HospitalityServiceCode == "H"
    }

    output 3
    {
    emit *
    where strFind("CF,BF,DF",DWELL_TYP_HSE) > -1
    and VIP_FLG_SBB == "B"
    and CommercialServiceCode == "C"
    and HospitalityServiceCode == ""
    }


  • 5.  RE: Using "in" within a filter node

    Employee
    Posted 01-05-2016 08:00

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

    Originally posted by: JAWILBUR

    I apologize, it looks like that particular node was just retaining the error "X" above it for some reason.