Classification Formula in JSL Based on DescriptionsHi,
I’m trying to automate the classification of steps based on the description for a series of items. Attached is an example table looking at different meals and the steps it takes to complete each one with a description associated with each step.
I would like to generate a script in JSL to classify each step based on where it is relative to the ‘eat’ step. If it is before the 'eat' step it should be called ‘Prep’, the eat step will be ‘Eating’, and anything after ‘eat’ will be ‘Clean’. I’ve tried nested 'If' statements, but I can’t figure out how to link the Step to the Description Column. The "Manual Fill of Type" column is what I'm trying to get from JSL.
Thank You!
Re: Classification Formula in JSL Based on DescriptionsAnd, for those of you (maybe just me) who don't prefer to script, you can use the Recode option under Columns to achieve the same result.
Re: Classification Formula in JSL Based on DescriptionsThanks Jim! This Perfect!!!Re: Classification Formula in JSL Based on DescriptionsHere is a formula for the column called "Type(Prep,Eating,Clean)" that will create the values you desire:
If( Row() == 1 | :Step == 1,
what = "Prep";
Flag = 0;
);
If( Flag == 1,
what = "Clean"
);
If( :Description == "Eat",
what = "Eating";
Flag = 1;
);
what;