cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
%3CLINGO-SUB%20id%3D%22lingo-sub-798174%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3Eeliminar%20columna%3A%20modo%20seguro%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-798174%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3E%E2%98%91%20nueva%20caracter%C3%ADstica%20interesante%3CBR%20%2F%3E%20%E2%98%91%20%C2%A1podr%C3%ADa%20ayudar%20a%20muchos%20usuarios!%3C%2FP%3E%3CP%3E%E2%98%91%20elimina%20algo%20que%20parece%20un%20%22error%22%3C%2FP%3E%3CP%3E%E2%98%90%20Es%20bueno%20tenerlo%3C%2FP%3E%3CP%3E%E2%98%90%20nadie%20lo%20necesita%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%C2%BFQu%C3%A9%20inspir%C3%B3%20esta%20solicitud%20de%20lista%20de%20deseos%3F%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3ECuando%20un%20usuario%20cambia%20el%20nombre%20de%20una%20columna%2C%20los%20scripts%20de%20tabla%20se%20actualizan%20autom%C3%A1ticamente.%3C%2FP%3E%3CP%3ECuando%20un%20usuario%20%3CU%3Eelimina%3C%2FU%3E%20una%20columna%20que%20se%20utiliza%20en%20un%20script%20de%20tabla%2C%20JMP%20advierte%20al%20usuario%20si%20la%20columna%20se%20utiliza%20en%20f%C3%B3rmulas%20de%20columna.%3CBR%20%2F%3E%20Pero%20un%20script%20de%20tabla%20morir%C3%A1%20sin%20previo%20aviso.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3Ea)%20el%20usuario%20tarda%20mucho%20tiempo%20en%20descubrir%20por%20qu%C3%A9%20el%20script%20de%20tabla%20est%C3%A1%20inactivo.%3C%2FP%3E%3CP%3Eb)%20se%20necesita%20algo%20de%20esfuerzo%20para%20crear%20la%20columna%20nuevamente%20(en%20el%20peor%20de%20los%20casos%3A%20no%20es%20posible%20crear%20la%20columna%20nuevamente)%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSTRONG%3E%C2%BFCu%C3%A1l%20es%20la%20mejora%20que%20le%20gustar%C3%ADa%20ver%3F%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EAntes%20de%20eliminar%20una%20columna%2C%20verifique%20si%20la%20columna%20se%20utiliza%20en%20un%20script%20de%20tabla%20y%20muestre%20una%20advertencia.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0A%0ACurrent%20Data%20Table()%20%26lt%3B%26lt%3B%20copy%20table%20script(%20%22no%20data%22%20)%3B%0AtableScript%20%3D%20Eval(%20Eval%20Expr(%20Parse(%20Expr(%20Get%20Clipboard()%20)%20)%20)%20)%3B%0A%0Acol_names%20%3D%20Current%20Data%20Table()%20%26lt%3B%26lt%3B%20Get%20Selected%20Columns()%3B%0A%0AtableScriptList%20%3D%20Substitute(%20Name%20Expr(%20tableScript%20)%2C%20Expr(%20New%20Table()%20)%2C%20Expr(%20List()%20)%20)%3B%0AtableScriptList%20%3D%20Filter%20Each(%20%7Bpart%7D%2C%20tableScriptList%2C%20Head(%20Part%20)%20%3D%3D%20Expr(%20New%20Script()%20)%20)%3B%0A%09%0Afound%20%3D%200%3B%0AFor%20Each(%20%7Bcol%7D%2C%20col_names%2C%0A%09For%20Each(%20%7BmyScript%7D%2C%20tableScriptList%2C%20%0A%0A%09%09If(%20Not(%20Is%20Empty(%20Eval(%20Eval%20Expr(%20Extract%20Expr(%20myScript%2C%20Expr(%20Name%20Expr(%20col%20)%20)%20)%20)%20)%20)%20)%2C%0A%09%09%09Caption(%20%7B100%2C%20200%7D%2C%20%22column%20%5C!%22%22%20%7C%7C%20(col%20%26lt%3B%26lt%3B%20get%20name())%20%7C%7C%20%22%5C!%22%20found%20in%20script%3A%20%5C!n%22%20%7C%7C%20Arg(%20myScript%2C%201%20)%20)%3B%0A%09%09%09found%20%3D%201%3B%0A%09%09%09print(%22found!!!%22)%3B%0A%09%09%09Wait(%201%20)%3B%0A%09%09)%0A%09)%0A)%3B%0A%0AIf(%20Not(%20found%20)%2C%0A%09Caption(%20%7B100%2C%20200%7D%2C%20%22no%20column%20found.%5C!N%20-%26gt%3Bcols%20can%20be%20deleted%22%20)%3B%0A%09Wait(%201%20)%3B%0A)%3B%0ACaption(%20remove%20)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSTRONG%3E%C2%BFPor%20qu%C3%A9%20es%20importante%20esta%20idea%3F%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EImag%C3%ADnese%20cu%C3%A1ntos%20usuarios%20de%20JMP%20mataron%20un%20script%20de%20tabla%20al%20eliminar%20%22accidentalmente%22%20una%20columna.%3CBR%20%2F%3E%20Cambiar%20al%20%22modo%20seguro%22%20evitar%C3%A1%20que%20muchos%20usuarios%20sufran%20el%20mismo%20problema.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fforums%2Fsearchpage%2Ftab%2Fmessage%3Ffilter%3Dlocation%2CauthorId%26amp%3Bq%3Dfeature%26amp%3Blocation%3Didea-board%3Ajmp-wish-list%26amp%3Bauthor_id%3D26800%22%20target%3D%22_self%22%3EOtros%20deseos%20de%3C%2FA%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_0-1726130690639.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1726130690639.png%22%20style%3D%22width%3A%2036px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1726130690639.png%22%20style%3D%22width%3A%2036px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68173i3455A88E196A5A29%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_0-1726130690639.png%22%20alt%3D%22hogi_0-1726130690639.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-798174%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CLINGO-LABEL%3EAutomatizaci%C3%B3n%20y%20scripting%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAcceso%20a%20datos%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ECombinaci%C3%B3n%20y%20limpieza%20de%20datos%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-800944%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20eliminar%20columna%3A%20modo%20seguro%20-%20Estado%20cambiado%20a%3A%20Reconocido%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-800944%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
0 Kudos

delete column: safe mode

☑ cool new feature
☑ could help many users!

☑ removes something that feels like a „bug“

☐ nice to have

☐ nobody needs it



What inspired this wish list request? 

When a user renames a column, Table Scripts get automatically updated.

When a user deletes a column which is used in a table script, JMP warns the user if the column is used in column formulas.
But a table script will die without notice.

 

a) it takes a long time for the user to find out why the table script is dead.

b) it takes some effort to create the column again (worst case: not possible to create the column again)

 

What is the improvement you would like to see? 

Before deleting a column, please check if the column is used in a table script - and show a warning.

 

Names Default To Here( 1 );

Current Data Table() << copy table script( "no data" );
tableScript = Eval( Eval Expr( Parse( Expr( Get Clipboard() ) ) ) );

col_names = Current Data Table() << Get Selected Columns();

tableScriptList = Substitute( Name Expr( tableScript ), Expr( New Table() ), Expr( List() ) );
tableScriptList = Filter Each( {part}, tableScriptList, Head( Part ) == Expr( New Script() ) );
	
found = 0;
For Each( {col}, col_names,
	For Each( {myScript}, tableScriptList, 

		If( Not( Is Empty( Eval( Eval Expr( Extract Expr( myScript, Expr( Name Expr( col ) ) ) ) ) ) ),
			Caption( {100, 200}, "column \!"" || (col << get name()) || "\!" found in script: \!n" || Arg( myScript, 1 ) );
			found = 1;
			print("found!!!");
			Wait( 1 );
		)
	)
);

If( Not( found ),
	Caption( {100, 200}, "no column found.\!N ->cols can be deleted" );
	Wait( 1 );
);
Caption( remove )

 

Why is this idea important? 

Just imagine how many JMP users killed a table script by "accidentally" deleting a column.
switching to "safe mode" will safe many users from the same issue.

 

 

other wishes from hogi_0-1726130690639.png

 

 

1 Comment
Status changed to: Acknowledged