Subscribe Bookmark RSS Feed

Newbie question: How can I set variables as values of a column?

razmah

Community Trekker

Joined:

Jul 20, 2015

I have 5 variables and need to put them in cells of a new column; I wrote the following script but it doesn't work

New Column( "Distance",

Numeric,

Continuous,

Format( "Best", 12 ),

Set Values( [char(Step1_Cond1), char(Step2_Cond1), char(Step3_Cond1),

char(Step4_Cond1), char(Step5_Cond1)] );

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Hi Rose,

Almost there--

Try the following:

// Create a new table

dt = New Table( "TMP" );

// Add a new column to the table called distance

dt << New Column( "Distance",

  Character,

  Nominal,

  Set Values( {Step1_Cond1, Step2_Cond1, Step3_Cond1, Step4_Cond1, Step5_Cond1} )

);


Best,

Stan

2 REPLIES
Solution

Hi Rose,

Almost there--

Try the following:

// Create a new table

dt = New Table( "TMP" );

// Add a new column to the table called distance

dt << New Column( "Distance",

  Character,

  Nominal,

  Set Values( {Step1_Cond1, Step2_Cond1, Step3_Cond1, Step4_Cond1, Step5_Cond1} )

);


Best,

Stan

razmah

Community Trekker

Joined:

Jul 20, 2015

Thanks a lottttt