There are couple of issues, using >>/<< as comparison and using For Each Row inside column creation. Below is one option for working syntax using << Set Each Value (do not that if value is is exactly 300 it will be empty)
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(9),
Compress File When Saved(1),
New Column("Number", Numeric, "Nominal", Format("Best", 9), Set Values([100, 200, 150, 275, 555, 424, 572, 783, 125])),
New Column("type1", Character(16), "Nominal", Set Values({"a1", "b1", "c1", "d1", "e1", "f1", "g1", "h1", "i1"})),
New Column("type2", Character(16), "Nominal", Set Values({"a2", "b2", "c2", "d2", "e2", "f2", "g2", "h2", "i2"}))
);
dt << New Column("result1", Character, "Nominal", << Set Each Value(
If(:Number < 300,
:type1
, //else
""
)
));
dt << New Column("result2", Character, Nominal, << Set Each Value(
If(:Number > 300,
:type2
, //else
""
)
));
I strongly suggest checking out scripting index directly from JMP's Help menu and Scripting Guide from JMP Help Page . There are also other scripting sources such as
Introduction to the JMP Scripting Language to get to know the syntax
-Jarmo