This is a simple 2 issue problem.
1. When you referenced
Num = :number << Get;
You are scoping the variable number wrong, ":" in front of the variable, tells JSL to look for a column named "Number" in a data table. If you either leave it blank, or specify "::" it will look for a memory variable.
2. If you want the scaler value from the memory variable "NUM" to be populated in all rows of the table you need to specify:
dataTable << New Column( "Price Code", Numeric, "Continuous", Set each Value( Num ) );
So the complete script would be:
Names Default To Here( 1 );
dataTable = New Table( "Data Table",
Add Rows( 3 ),
New Column( "Customer Name", Character, "Nominal", Set Values( {"Jane", "Scott", "Abby"} ) ),
New Column( "Dollar Amount", "Continuous", Set Values( [2002, 1323, 1954] ) )
);
popUp = New Window( "Number",
<<modal(),
Panel Box( "Enter a Number", Lineup Box( N Col( 1 ) ), number = Number Edit Box( 34 ) ),
Panel Box( "Actions",
H List Box(
Button Box( "OK",
keep_going = 1;
Num = number << Get;
),
Button Box( "Cancel", keep_going = 0 )
),
),
);
dataTable << New Column( "Price Code", Numeric, "Continuous", Set each Value( Num ) );
Jim