cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
%3CLINGO-SUB%20id%3D%22lingo-sub-6268%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EDeterminar%20si%20existe%20una%20columna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-6268%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CP%3ETengo%20un%20script%20JMP%20que%20crea%20una%20nueva%20columna%20con%20una%20f%C3%B3rmula.%20Estoy%20tratando%20de%20averiguar%20c%C3%B3mo%20detectar%20si%20la%20columna%20ya%20existe%20para%20poder%20omitir%20su%20creaci%C3%B3n%20y%20evitar%20generar%20columnas%20adicionales.%20Estoy%20seguro%20de%20que%20est%C3%A1%20ah%C3%AD%2C%20pero%20no%20lo%20encuentro%20en%20la%20literatura%20que%20tengo.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EGracias.%3C%2FP%3E%3CP%3EMiguel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-55586%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Determinar%20si%20existe%20una%20columna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-55586%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EAqu%C3%AD%20hay%20una%20versi%C3%B3n%20de%20mi%20l%C3%B3gica%20que%20no%20distingue%20entre%20may%C3%BAsculas%20y%20min%C3%BAsculas.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%3D%20open(%22%24sample_data%5CBig%20Class.jmp%22)%3B%0Acol_name_list%20%3D%20dt%20%26lt%3B%26lt%3B%20get%20column%20names(string)%3B%0A%2F%2F%20Convert%20all%20column%20names%20to%20uppercase%20for%20case-insensitive%20search%0Afor%20(i%20%3D%201%2C%20i%20%26lt%3B%3D%20nitems(col_name_list)%2C%20i%2B%2B%2C%0A%20col_name_list%5Bi%5D%20%3D%20uppercase(col_name_list%5Bi%5D)%3B%0A)%3B%0Anew_column%20%3D%20%22BMI%22%3B%0A%2F%2F%20English%20BMI%20Formula%20BMI%20%3D%20(%20Weight%20in%20Pounds%20%2F%20(%20Height%20in%20inches%5E2%20)%20)%20x%20703%0Aif%20(!contains(col_name_list%2C%20uppercase(new_column))%2C%0A%20%20%20%20dt%20%26lt%3B%3CNEW%20column%3D%22%22%3E%3C%2FNEW%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-55531%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Determinar%20si%20existe%20una%20columna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-55531%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EGracias%20ms!%3CBR%20%2F%3E%20Solo%20tu%20ejemplo%20funcion%C3%B3%20para%20m%C3%AD%2C%20porque%20la%20otra%20soluci%C3%B3n%20distingue%20entre%20may%C3%BAsculas%20y%20min%C3%BAsculas.%20Tuve%20que%20usar%20el%20tuyo%2C%20ya%20que%20no%20pod%C3%ADa%20estar%20seguro%20de%20que%20las%20may%C3%BAsculas%20y%20min%C3%BAsculas%20de%20mis%20caracteres%20de%20cadena%20fueran%20correctas.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-6276%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Determinar%20si%20existe%20una%20columna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-6276%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EPMroz%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EPerm%C3%ADtanme%20comenzar%20confirmando%20que%20el%20c%C3%B3digo%20que%20escribieron%20funcion%C3%B3%20para%20m%C3%AD%20tambi%C3%A9n%2C%20y%20la%20explicaci%C3%B3n%20que%20escrib%C3%AD%20no%20es%20consistente%20con%20el%20comportamiento%20de%20JMP%209%20o%2010.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EDespu%C3%A9s%20de%20leer%20su%20respuesta%2C%20tambi%C3%A9n%20prob%C3%A9%20varias%20combinaciones%20diferentes%20de%20contiene%20y%20si%20las%20declaraciones%20con%20listas%2C%20cadenas%20y%20n%C3%BAmeros%20en%20JMP%209%20y%2010.%20Aunque%20mis%20intentos%20no%20fueron%20exhaustivos%2C%20todos%20mis%20resultados%20son%20consistentes%20con%20los%20suyos.%20Inicialmente%2C%20cuando%20le%C3%AD%20su%20primera%20publicaci%C3%B3n%2C%20record%C3%A9%20algunas%20soluciones%20de%20problemas%20que%20hab%C3%ADa%20realizado%20a%C3%B1os%20antes%20en%20las%20que%20hab%C3%ADa%20adoptado%20el%20uso%20de%20contains()%26gt%3B0.%20No%20puedo%20recrear%20el%20escenario%3B%20sin%20embargo%2C%20encontr%C3%A9%20la%20siguiente%20informaci%C3%B3n%20en%20la%20gu%C3%ADa%20de%20secuencias%20de%20comandos%20JMP.%20Detalla%20el%20uso%20de%20contiene%20con%20%26gt%3B0%2C%20que%20puede%20ser%20apropiado%20para%20su%20ejemplo%2C%20pero%20no%20establece%20expl%C3%ADcitamente%20si%20es%20o%20no%20es%20necesario.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EP%C3%A1gina%20136%20de%20la%20gu%C3%ADa%20de%20secuencias%20de%20comandos%20JMP%20versi%C3%B3n%2010%3A%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20AGaramond-Regular%3B%20font-size%3A%2010pt%3B%22%3E%22Para%20evaluar%20si%20un%20elemento%20est%C3%A1%20en%20una%20lista%2C%20utilice%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20LucidaSansTypewriter%3B%20font-size%3A%209pt%3B%22%3E%20ubicaci%C3%B3n()%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20AGaramond-Regular%3B%20font-size%3A%2010pt%3B%22%3E%20y%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20LucidaSansTypewriter%3B%20font-size%3A%209pt%3B%22%3E%20Contiene()%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20AGaramond-Regular%3B%20font-size%3A%2010pt%3B%22%3E%20con%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20LucidaSansTypewriter%3B%20font-size%3A%209pt%3B%22%3E%20%26gt%3B0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20AGaramond-Regular%3B%20font-size%3A%2010pt%3B%22%3E%20.%20Un%20valor%20devuelto%20de%20cero%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20AGaramond-Regular%3B%20font-size%3A%2010pt%3B%22%3Esignifica%20que%20el%20art%C3%ADculo%20no%20est%C3%A1%20en%20la%20lista.%20Un%20valor%20devuelto%20de%201%20significa%20que%20el%20elemento%20est%C3%A1%20en%20la%20lista%20al%20menos%20una%20vez%22.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20AGaramond-Regular%3B%20font-size%3A%2010pt%3B%22%3E...%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20AGaramond-Regular%3B%20font-size%3A%2010pt%3B%22%3E%22Averigua%20si%20el%20n%C3%BAmero%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20LucidaSansTypewriter%3B%20font-size%3A%209pt%3B%22%3E%205%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20AGaramond-Regular%3B%20font-size%3A%2010pt%3B%22%3E%20existe%20en%20el%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20LucidaSansTypewriter%3B%20font-size%3A%209pt%3B%22%3E%20numList%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20LucidaSansTypewriter%3B%20font-size%3A%209pt%3B%22%3ENRow(Loc(numList%2C%205))%20%26gt%3B0%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CEM%20style%3D%22font-size%3A%209pt%3B%20font-family%3A%20LucidaSansTypewriter%2CItalic%3B%22%3E0%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20LucidaSansTypewriter%3B%20font-size%3A%209pt%3B%22%3EContiene(listaNum%2C%205)%20%26gt%3B0%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CEM%20style%3D%22font-size%3A%209pt%3B%20font-family%3A%20LucidaSansTypewriter%2CItalic%3B%22%3E0%22%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EEspero%20que%20esto%20ayude.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-6275%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Determinar%20si%20existe%20una%20columna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-6275%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHola%20wiebepo%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EProb%C3%A9%20diferentes%20combinaciones%20y%20negar%20un%20entero%20positivo%2C%20sin%20importar%20cu%C3%A1n%20grande%20sea%2C%20da%20como%20resultado%20un%200.%20Entonces%20mi%20c%C3%B3digo%20funcionar%C3%A1%20(en%20JMP%209%20y%2010).Dicho%20esto%2C%20agradezco%20las%20advertencias%3A%20es%20posible%20que%20este%20enfoque%20no%20funcione%20en%20todos%20los%20idiomas.Ciertamente%20lleva%20m%C3%A1s%20pruebas.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Eb%20%3D%202000000000000%3B%0A!b%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EEl%20registro%20muestra%3A%3C%2FP%3E%0A%3CP%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E0%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESaludos%2C%3C%2FP%3E%0A%3CP%3EPMroz%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-6274%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Determinar%20si%20existe%20una%20columna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-6274%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ETambi%C3%A9n%20es%20%C3%BAtil%20saberlo.%20Siempre%20estoy%20contento%20de%20tener%20otra%20herramienta%20para%20agregar%20a%20la%20caja%20de%20herramientas.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EGracias.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-6273%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Determinar%20si%20existe%20una%20columna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-6273%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EEso%20es%20muy%20%C3%BAtil%20para%20saber.%20Tendr%C3%A9%20que%20estar%20atento%20a%20eso.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EGracias%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-6272%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Determinar%20si%20existe%20una%20columna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-6272%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ENo%20hay%20una%20sola%20funci%C3%B3n%20que%20yo%20sepa.%20Pero%3CEM%3E%20Est%C3%A1%20perdido()%3C%2FEM%3E%20en%20combinaci%C3%B3n%20con%3CEM%3E%20Es%20programable%20()%3C%2FEM%3E%20puede%20hacer%20el%20truco.%3C%2FP%3E%0A%3CP%3ELa%20columna%20tambi%C3%A9n%20debe%20estar%20encerrada%20por%20una%20instrucci%C3%B3n%20Try()%20para%20evitar%20que%20la%20secuencia%20de%20comandos%20se%20detenga%20si%20la%20columna%20no%20existiera.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%3D%20Open(%20%22%24sample_data%5CBig%20Class.jmp%22%20)%3B%0A%20%0Anew_column%20%3D%20%22BMI%22%3B%0A%20%0AIf(%20Is%20Missing(%20Is%20Scriptable(%20Try(%20Column(%20new_column%20)%20)%20)%20)%2C%0A%20dt%20%26lt%3B%26lt%3B%20New%20Column(%20new_column%2C%20numeric%2C%20continuous%2C%20formula(%20703%20*%20%3Aweight%20%2F%20%3Aheight%20%2F%20%3Aheight%20)%20)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%20style%3D%22margin%3A%200.0px%200.0px%200.0px%200.0px%3B%20color%3A%20%23a70096%3B%22%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-6271%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Determinar%20si%20existe%20una%20columna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-6271%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%20style%3D%22font-family%3A%20'Helvetica%20Neue'%2C%20Helvetica%2C%20Arial%2C%20'Lucida%20Grande'%2C%20sans-serif%3B%20background-color%3A%20%23ffffff%3B%22%3E%3CSPAN%20style%3D%22font-style%3A%20inherit%3B%20font-size%3A%2010pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3ENo%20estoy%20seguro%20si%20esto%20es%20cierto%20en%20todas%20las%20versiones%20recientes%20de%20JMP.%20Hago%20este%20comentario%20solo%20para%20resaltar%20una%20oportunidad%20de%20mejorar%20la%20solidez%20del%20c%C3%B3digo.%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22font-family%3A%20'Helvetica%20Neue'%2C%20Helvetica%2C%20Arial%2C%20'Lucida%20Grande'%2C%20sans-serif%3B%20background-color%3A%20%23ffffff%3B%22%3E%3CSPAN%20style%3D%22font-style%3A%20inherit%3B%20font-size%3A%2010pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22font-family%3A%20'Helvetica%20Neue'%2C%20Helvetica%2C%20Arial%2C%20'Lucida%20Grande'%2C%20sans-serif%3B%20background-color%3A%20%23ffffff%3B%22%3E%3CSPAN%20style%3D%22font-style%3A%20inherit%3B%20font-size%3A%2010pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E'Contiene'%20devuelve%20la%20posici%C3%B3n%20del%20elemento%2C%20que%20est%C3%A1%20bien%20para%20usar%20en%20una%20declaraci%C3%B3n%20'si'%2C%20ya%20que%20cero%20se%20interpretar%C3%A1%20como%20falso%20y%20un%20valor%20positivo%20se%20interpretar%C3%A1%20como%20verdadero.%20Cuando%20precede%20a%20un%20contiene%20con%20un%20'!'%2C%20la%20condici%C3%B3n%20funciona%20cuando%20el%20elemento%20no%20est%C3%A1%20presente%20o%20cuando%20est%C3%A1%20presente%20como%20el%20primer%20elemento%3B%20sin%20embargo%2C%20cuando%20el%20elemento%20no%20es%20el%20primero%20(un%20valor%20mayor%20que%201)%2C%20el%20not%20'!'%20puede%20fallar%20al%20convertir%20la%20condici%C3%B3n%20en%20falsa.%20Esto%20se%20puede%20evitar%20usando%20una%20comparaci%C3%B3n%20'%26gt%3B0'%20con%20'contiene'.%20Consulte%20a%20continuaci%C3%B3n%20la%20sintaxis.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%3D%20Open(%20%22%24sample_data%5CBig%20Class.jmp%22%20)%3B%0A%20%0Acol_name_list%20%3D%20dt%20%26lt%3B%26lt%3B%20get%20column%20names(%20string%20)%3B%0A%20%0Anew_column%20%3D%20%22BMI%22%3B%0A%20%0A%2F%2F%20English%20BMI%20Formula%0A%2F%2F%20BMI%20%3D%20(%20Weight%20in%20Pounds%20%2F%20(%20Height%20in%20inches%20x%20Height%20in%20inches%20)%20)%20x%20703%0A%20%0AIf(%20!(Contains(%20col_name_list%2C%20new_column%20)%20%26gt%3B%200)%2C%0A%20dt%20%26lt%3B%26lt%3B%20New%20Column(%20%22BMI%22%2C%20numeric%2C%20continuous%2C%20formula(%20703%20*%20%3Aweight%20%2F%20%3Aheight%20%2F%20%3Aheight%20)%20)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%20style%3D%22font-family%3A%20'Helvetica%20Neue'%2C%20Helvetica%2C%20Arial%2C%20'Lucida%20Grande'%2C%20sans-serif%3B%20background-color%3A%20%23ffffff%3B%22%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-6270%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Determinar%20si%20existe%20una%20columna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-6270%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EGracias%2C%20eso%20funciona%20bien%20para%20m%C3%AD.%20Esperaba%20encontrar%20una%20funci%C3%B3n%20para%20verificar%20la%20existencia%2C%20pero%20esto%20funciona.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-6269%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Determinar%20si%20existe%20una%20columna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-6269%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%20style%3D%22margin-bottom%3A%200.0001pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%3D%20open(%22%24sample_data%5CBig%20Class.jmp%22)%3B%0A%20%0Acol_name_list%20%3D%20dt%20%26lt%3B%26lt%3B%20get%20column%20names(string)%3B%0A%20%0Anew_column%20%3D%20%22BMI%22%3B%0A%20%0A%2F%2F%20English%20BMI%20Formula%0A%2F%2F%20BMI%20%3D%20(%20Weight%20in%20Pounds%20%2F%20(%20Height%20in%20inches%20x%20Height%20in%20inches%20)%20)%20x%20703%0A%20%0Aif%20(!contains(col_name_list%2C%20new_column)%2C%0A%20%20%20%20%20%20dt%20%26lt%3B%3CNEW%20column%3D%22%22%3E%3C%2FNEW%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
mwechtal
Level III

Determining if a column exists

I have a JMP script that creates a new column with a formula in it. I'm trying to find out how to detect if the column already exists so that I can skip creating it, and avoid generating extra columns. I'm sure it's there, but I'm not finding it in the literature that I have.

Thanks.

Mike

10 REPLIES 10
wiebepo
Level III

Re: Determining if a column exists

PMroz,

Let me start by confirming that the code you wrote worked for me as well, and the explaination I wrote is not consistent with JMP 9 or 10 behavior.

After reading your reply, I also tried several different combinations of contains, and if statements with lists, string, and numbers in JMP 9 and 10. Although my attempts were not exhaustive, all of my results are consistent with yours. Initially, when I read your first post I recalled some troubleshooting that I had perform years prior where I had adopted the the use of contains()>0. I am unable to recreate the scenario; however, I did find the following information in the JMP scripting guide. It details using contains with >0, which may be appropriate for their example, but does not explicitly state that it is or is not required.

Page 136 of the JMP scripting guide version 10:

"To assess whether an item is in a list, use Loc() and Contains() with >0. A returned value of zero

means that the item is not in the list. A returned value of 1 means that the item is in the list at least once."

...

"Find out if the number 5 exists in the numList:

NRow(Loc(numList, 5)) >0;

0

Contains(numList, 5) >0;

0"

Hope this helps.