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.  How to pull a value for a column

    Employee
    Posted 09-02-2016 05:39

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

    Originally posted by: Jagdev

    Hey,

    Is there a way to use the columns value in a code. Example I have 2 columns with unique value say 5 and 4 respectively in it. I need to use the values of these columns in my code.
    Say -
    m is my "Variable"

    m = (Value of column 1) 5 - (Value of Column 2) 4

    So my m value will be 1

    Please let me know if I am unclear.

    Regards,
    Jagdev


  • 2.  RE: How to pull a value for a column

    Employee
    Posted 09-02-2016 05:49

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

    Originally posted by: gmullin

    Can't you just use them in a filter?

    node:Static_Data
    bretype:core::Static Data
    editor:sortkey=57c974a2637d3fe0
    output:@40fe6c55598828e5/=
    prop:StaticData=<<EOX
    col1:int,col2:int
    5,4
    EOX
    editor:XY=130,100
    end:Static_Data
    
    node:Filter
    bretype:core::Filter
    editor:sortkey=57c974b45a2f03d4
    input:@40fd2c74167f1ca2/=Static_Data.40fe6c55598828e5
    output:@40fd2c7420761db6/=
    prop:Script=<<EOX
    m = 'col1' - 'col2'
    
    emit *, m
    
    EOX
    editor:XY=240,100
    end:Filter


  • 3.  RE: How to pull a value for a column

    Employee
    Posted 09-02-2016 07:27

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

    Originally posted by: AdamParker

    Gerard is correct.

    The sample he provided shows you that you can reference the values of the columns (col1 and col2 in his example) in BrainScript by using the single quote (or tick ') around the column names and then using them in an expression.


  • 4.  RE: How to pull a value for a column

    Employee
    Posted 09-05-2016 04:51

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

    Originally posted by: Jagdev

    Hi Adam and gmullin,

    Thanks for your input. It helped me to solve my problem.

    Regards,
    Jagdev