On my main table (Table 1), I have a column called "Bin" which holds any number (corresponding to the column "Bin Number" entries on another table which is Table 2). Now I want to assign Value Labels to this column "Bin" through script. The value labels would be coming from Table 2 with two columns: "Bin Number" and "Description".
Hard-coding something like
Column( dt, 1 ) << Add Column Properties( Value Labels( {"1" = "Cool", "2" = "Awesome", "3" = "Bad"} ), Use Value Labels( 1 ) );
is simple enough. However I am struggling with how to create the expression with the value labels being dynamic and formulated from whats on the other table. On the above code, "1, 2, 3,..." are entries for "Bin Number" while "Cool, Awesome, Bad,..." are entries for "Description" from Table 2.
I appreciate it if you can point me to some neat tricks. Thanks!