cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-107193%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERenommer%20la%20table%20de%20donn%C3%A9es%20en%20utilisant%20un%20nom%20de%20table%20pr%C3%A9c%C3%A9dent%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-107193%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EJe%20sais%20que%20je%20peux%20renommer%20une%20table%20en%20utilisant%3C%2FP%3E%3CP%3Edt%20%26lt%3B%26lt%3B%20SetName(%22PremierTablename%22)%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMais%20disons%20que%20j'aimerais%20renommer%20une%20deuxi%C3%A8me%20table%20de%20donn%C3%A9es%20qui%20concat%C3%A8ne%20le%20nom%20de%20la%20premi%C3%A8re%20table%20de%20donn%C3%A9es%20afin%20qu'elle%20ressemble%20%C3%A0%20quelque%20chose%20comme%3C%2FP%3E%3CP%3Edt2%20%26lt%3B%26lt%3B%20SetName(%20Nomde1stTable%20%7C%7C%20%22%202%22)%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEst-ce%20que%20quelqu'un%20sait%20comment%20je%20pourrais%20simplement%20nommer%20une%202%C3%A8me%20table%20avec%20un%20caract%C3%A8re%20ajout%C3%A9%20%3F%20La%20raison%20pour%20laquelle%20je%20veux%20faire%20cela%20est%20que%20je%20modifie%20g%C3%A9n%C3%A9ralement%20plusieurs%20tables%20dans%20JSL%20avec%20des%20fractionnements%20et%20des%20jointures%20et%20que%20je%20me%20retrouve%20avec%20un%20grand%20nombre%20de%20tables%20sans%20titre%20dont%20j'ai%20du%20mal%20%C3%A0%20savoir%20de%20quelle%20table%20%22parent%22%20elles%20sont%20d%C3%A9riv%C3%A9es.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMerci%20d'avance!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-107387%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%20%3A%20Renommer%20la%20table%20de%20donn%C3%A9es%20en%20utilisant%20un%20nom%20de%20table%20pr%C3%A9c%C3%A9dent%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-107387%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt2%20%26lt%3B%26lt%3B%20set%20name(%20dt%20%26lt%3B%26lt%3B%20get%20name%20%7C%7C%20%22%202%22%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EEn%20r%C3%A9alit%C3%A9%2C%20vous%20n'%C3%AAtes%20pas%20oblig%C3%A9%20d'effectuer%20la%20concat%C3%A9nation%20car%20JMP%20verra%20que%20le%20nom%20que%20vous%20d%C3%A9finissez%20est%20le%20m%C3%AAme%20que%20celui%20d'une%20autre%20table%20et%20ajoutera%20automatiquement%20le%20%C2%AB%202%20%C2%BB%20%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt2%20%26lt%3B%26lt%3B%20set%20name(%20dt%20%26lt%3B%26lt%3B%20get%20name%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
bioptical
Level I

Renaming Data Table using a previous table name

I know I can rename a table using 

dt << SetName("FirstTablename");

 

But say I'd like to rename a 2nd data table that concatenates the name of the 1st data table so that it is something like

dt2 << SetName( Nameof1stTable || " 2");

 

Does anyone know how I could just name a 2nd table with an appended character? The reason I want to do this is that usually I modify multiple tables in JSL with splits and joins and end up with a large number of untitled tables which I find hard to keep track of which "parent" table it was derived from.

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Renaming Data Table using a previous table name

dt2 << set name( dt << get name || " 2" );

In actuality, you do not have to do the concatenation because JMP will see that the name you set is the same as another table, and will automatically add the "2";

dt2 << set name( dt << get name );

 

Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: Renaming Data Table using a previous table name

dt2 << set name( dt << get name || " 2" );

In actuality, you do not have to do the concatenation because JMP will see that the name you set is the same as another table, and will automatically add the "2";

dt2 << set name( dt << get name );

 

Jim

Recommended Articles