There are multiple methods to accomplish what I think you need. First of all you need to understand JMP syntax for referencing columns. For example, if you wanted to create a new column that randomly choose organization 1-5 here would be teh column formula
i = Random Integer(1,5);
Column( "designation_organization_" || Char( i ) )[Row()];
|| is the concatenation operator, Char(i) is the string. Then brackets represent the row from the sepcified column.
I have attached a table. I do not have any idea what your table looks like, but maybe this script will help.
Open the attached table. Then run this script
dt=data table("matriculation");
cnmes = dt << get column names("string");
dcols = {}; //create a list of decision columns
for(i=1, i<=nitems(cnmes), i++,
if( contains(cnmes[i], "_decision_"), Insert into(dcols, cnmes[i]) )
);
//create a new column
matcol = dt << New Column("Major", Character);
//rowwise
for(i=1, i <= nrow(dt) , i++,
k = Contains(dt[i,dcols], "Matriculated");
//dt[ i, dcols] is a list of values in the decision columns from row i
//contains returns the position in the list for "Matriculated"
matcol[i] = if(k>0, Column("designation_organization_" || char(k))[i], "None" );
//if k > 0, "Matriculated" was found, so assign to matcol the organization for the corresponding k
);
Note, JMP allows using column numbers. Here is a script, for a new column for the attached table, that uses column numbers