I made a script which gives a pop box to enter suspected wafer list. Than it will add a column to the table with using If loop. This script is working fine when Wafer data type is Character but it doesn't work with Numerical type data type. How can I fix this?
dt = Current Data Table(); // Get the current data table
nw = New Window("Enter Shop order",
<<Modal,
<<Return Result,
V List Box(
Text Box(" "),
variablebox = Text Edit Box("", <<Set N Lines(30), <<Set Width(150)),
Spacer Box(Size(0, 10)),
Button Box("OK"),
Button Box("Cancel")
)
);
unique = Collapse Whitespace(nw["variablebox"]);
sql_in = Associative Array(Words(unique, ", ")) << get keys;
myValueList = Concat Items(sql_in, ", ");
// Define a list of values to check against
//myValueList = {"1", "2"};
// Create a new column with a formula using the If statement
dt << New Column("Suspected",
Formula(
If(Contains(myValueList, :Name("Wafer")),
"Yes",
"No"
)
)
);
