Hi all,
I want to build a simple error trap where it will flag the error if the variable name from the user defined variable name with the existing table variable name. For example as below;
User defined Data table
Variable Name
1. Benzene
2. Methane
3. Ethane
Existing Data Table
Variable Name
1. Benzene
2. Methane
3. Ethane
4. Propane
5. Pentane
6. Hexane
I tried to used !contains function, but it seemed that I dont use the syntax properly. I'm a very new to jmp script, so I'm seeking for anyone in the community help
Inputdt = User Defined Data Table Name
mvdt = Existing Data Table Name
//Get required variable lists from user define Data Table
varListInput = Column( Inputdt, "Variable Name" ) << get values;
// Error trap - if # UserDefinedTable & # Existing Data Table variables don't match, then break code & output error message.
//Obtain column names from existing Data Table from list
colnames = mvdt << get column names( string );
show(colnames);
show(varListInput);
If(!contains Item ("colnames", "varListInput"),
Message = Dialog( "The Variable Name does not match with Existing Data Table.Please correct your Input Table." );
Stop();
);