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%3EDeterminazione%20dell'esistenza%20di%20una%20colonna%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%3EHo%20uno%20script%20JMP%20che%20crea%20una%20nuova%20colonna%20con%20una%20formula%20al%20suo%20interno.%20Sto%20cercando%20di%20scoprire%20come%20rilevare%20se%20la%20colonna%20esiste%20gi%C3%A0%20in%20modo%20da%20poter%20saltare%20la%20creazione%20ed%20evitare%20di%20generare%20colonne%20aggiuntive.%20Sono%20sicuro%20che%20c'%C3%A8%2C%20ma%20non%20lo%20trovo%20nella%20letteratura%20che%20ho.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EGrazie.%3C%2FP%3E%3CP%3EMike%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-55586%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20determinare%20se%20esiste%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-55586%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EEcco%20una%20versione%20della%20mia%20logica%20che%20non%20fa%20distinzione%20tra%20maiuscole%20e%20minuscole.%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%3ERi%3A%20determinare%20se%20esiste%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-55531%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EGrazie%20ms!%3CBR%20%2F%3E%20Solo%20il%20tuo%20esempio%20ha%20funzionato%20per%20me%2C%20perch%C3%A9%20l'altra%20soluzione%20fa%20distinzione%20tra%20maiuscole%20e%20minuscole.%20Ho%20dovuto%20usare%20il%20tuo%2C%20poich%C3%A9%20non%20potevo%20essere%20sicuro%20che%20il%20caso%20dei%20miei%20caratteri%20di%20stringa%20fosse%20corretto.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-6276%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20determinare%20se%20esiste%20una%20colonna%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%3EVorrei%20iniziare%20confermando%20che%20il%20codice%20che%20hai%20scritto%20ha%20funzionato%20anche%20per%20me%20e%20la%20spiegazione%20che%20ho%20scritto%20non%20%C3%A8%20coerente%20con%20il%20comportamento%20di%20JMP%209%20o%2010.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EDopo%20aver%20letto%20la%20tua%20risposta%2C%20ho%20anche%20provato%20diverse%20combinazioni%20di%20istruzioni%20contains%20e%20if%20con%20elenchi%2C%20stringhe%20e%20numeri%20in%20JMP%209%20e%2010.%20Sebbene%20i%20miei%20tentativi%20non%20siano%20stati%20esaustivi%2C%20tutti%20i%20miei%20risultati%20sono%20coerenti%20con%20i%20tuoi.%20Inizialmente%2C%20quando%20ho%20letto%20il%20tuo%20primo%20post%2C%20ho%20ricordato%20alcuni%20problemi%20che%20avevo%20eseguito%20anni%20prima%20in%20cui%20avevo%20adottato%20l'uso%20di%20contains()%26gt%3B0.%20Non%20riesco%20a%20ricreare%20lo%20scenario%3B%20tuttavia%2C%20ho%20trovato%20le%20seguenti%20informazioni%20nella%20guida%20agli%20script%20di%20JMP.%20Descrive%20in%20dettaglio%20l'utilizzo%20contiene%20con%20%26gt%3B0%2C%20che%20pu%C3%B2%20essere%20appropriato%20per%20il%20loro%20esempio%2C%20ma%20non%20afferma%20esplicitamente%20che%20sia%20o%20non%20sia%20richiesto.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EPagina%20136%20della%20guida%20agli%20script%20di%20JMP%20versione%2010%3A%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20AGaramond-Regular%3B%20font-size%3A%2010pt%3B%22%3E%22Per%20valutare%20se%20un%20elemento%20%C3%A8%20in%20un%20elenco%2C%20utilizzare%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20LucidaSansTypewriter%3B%20font-size%3A%209pt%3B%22%3E%20Loc()%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20AGaramond-Regular%3B%20font-size%3A%2010pt%3B%22%3E%20E%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%20valore%20restituito%20pari%20a%20zero%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20AGaramond-Regular%3B%20font-size%3A%2010pt%3B%22%3Esignifica%20che%20l'elemento%20non%20%C3%A8%20nell'elenco.%20Un%20valore%20restituito%20pari%20a%201%20significa%20che%20l'elemento%20%C3%A8%20presente%20nell'elenco%20almeno%20una%20volta.%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%22Scopri%20se%20il%20numero%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%20esiste%20nel%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20LucidaSansTypewriter%3B%20font-size%3A%209pt%3B%22%3E%20numLista%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20LucidaSansTypewriter%3B%20font-size%3A%209pt%3B%22%3ENRiga(Loc(numLista%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(numLista%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%3ESpero%20che%20questo%20ti%20aiuti.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-6275%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20determinare%20se%20esiste%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-6275%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECiao%20wiebepo%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHo%20provato%20diverse%20combinazioni%20e%20la%20negazione%20di%20un%20numero%20intero%20positivo%2C%20non%20importa%20quanto%20grande%2C%20risulta%20in%20uno%200.%20Quindi%20il%20mio%20codice%20funzioner%C3%A0%20(in%20JMP%209%20e%2010).Detto%20questo%2C%20apprezzo%20l'avviso%3A%20questo%20approccio%20potrebbe%20non%20funzionare%20in%20tutte%20le%20lingue.Certamente%20sopporta%20ulteriori%20test.%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%3EIl%20registro%20mostra%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%3ESaluti%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%3ERi%3A%20determinare%20se%20esiste%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-6274%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EUtile%20anche%20sapere.%20Sono%20sempre%20felice%20di%20avere%20un%20altro%20strumento%20da%20aggiungere%20alla%20cassetta%20degli%20attrezzi.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EGrazie.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-6273%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20determinare%20se%20esiste%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-6273%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%C3%88%20molto%20utile%20saperlo.%20Dovr%C3%B2%20stare%20attento%20a%20quello.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EGrazie%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-6272%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20determinare%20se%20esiste%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-6272%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ENon%20esiste%20una%20singola%20funzione%20di%20cui%20sono%20a%20conoscenza.%20Ma%3CEM%3E%20Manca()%3C%2FEM%3E%20in%20combinazione%20con%3CEM%3E%20%C3%A8%20scriptabile()%3C%2FEM%3E%20pu%C3%B2%20fare%20il%20trucco.%3C%2FP%3E%0A%3CP%3ELa%20colonna%20deve%20anche%20essere%20racchiusa%20da%20un'istruzione%20Try()%20per%20evitare%20che%20lo%20script%20si%20interrompa%20se%20la%20colonna%20non%20esiste.%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%3ERi%3A%20determinare%20se%20esiste%20una%20colonna%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%3ENon%20sono%20sicuro%20che%20questo%20sia%20vero%20in%20tutte%20le%20versioni%20recenti%20di%20JMP.%20Faccio%20questo%20commento%20solo%20per%20evidenziare%20un'opportunit%C3%A0%20per%20migliorare%20la%20robustezza%20del%20codice.%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'Contains'%20restituisce%20la%20posizione%20dell'elemento%2C%20che%20va%20bene%20da%20usare%20in%20un'istruzione%20'if'%2C%20poich%C3%A9%20zero%20sar%C3%A0%20interpretato%20come%20falso%20e%20un%20valore%20positivo%20sar%C3%A0%20interpretato%20come%20vero.%20Quando%20si%20fa%20precedere%20a%20contains%20da%20not%20'!'%2C%20la%20condizione%20funziona%20quando%20l'elemento%20non%20%C3%A8%20presente%20o%20quando%20%C3%A8%20presente%20come%20primo%20elemento%3B%20tuttavia%2C%20quando%20l'elemento%20non%20%C3%A8%20il%20primo%20(%20un%20valore%20maggiore%20di%201%20)%2C%20non%20'!'%20pu%C3%B2%20fallire%20nel%20convertire%20la%20condizione%20in%20false.%20Ci%C3%B2%20pu%C3%B2%20essere%20evitato%20utilizzando%20un%20confronto%20'%26gt%3B0'%20con%20'contiene'.%20Vedi%20sotto%20per%20la%20sintassi.%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%3ERi%3A%20determinare%20se%20esiste%20una%20colonna%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-6270%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EGrazie%2C%20a%20me%20funziona%20benissimo.%20Mi%20aspettavo%20di%20trovare%20una%20funzione%20per%20verificare%20l'esistenza%2C%20ma%20funziona.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-6269%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20determinare%20se%20esiste%20una%20colonna%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.