cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
%3CLINGO-SUB%20id%3D%22lingo-sub-40322%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Nachkommastellen%20in%20%C3%9Cbersichtstabelle%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-40322%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EPerfekt%2C%20funktioniert!Danke.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-40319%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Nachkommastellen%20in%20%C3%9Cbersichtstabelle%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-40319%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EGet%20Property%20und%20Set%20Property%20sind%20nicht%20die%20Funktionen%2C%20die%20f%C3%BCr%20das%20Setzen%20und%20Zur%C3%BCckziehen%20von%20Formaten%20verwendet%20werden.%20Es%20werden%20die%20Nachrichten%20%22Format%22%20und%20%22Get%20Format%22%20verwendet.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%5Cbig%20class.jmp%22%20)%3B%0AShow(%20dt%3Aweight%20%26lt%3B%26lt%3B%20get%20format%20)%3B%0Adt%3Aweight%20%26lt%3B%26lt%3B%20Format(%20%22Fixed%20Dec%22%2C%2012%2C%206%20)%3B%0AShow(%20dt%3Aweight%20%26lt%3B%26lt%3B%20get%20format%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-631197%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Dezimalstellen%20in%20der%20%C3%9Cbersichtstabelle%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-631197%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHallo%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2687%22%20target%3D%22_blank%22%3E%20%40txnelson%3C%2FA%3E%20%2C%20k%C3%B6nnen%20Sie%20sagen%2C%20wie%20man%20das%20Get-Format%20auf%20eine%20neue%20Spalte%20anwendet%3F%20Zum%20Beispiel%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%5Cbig%20class.jmp%22%20)%3B%0Adtformat%3D%20dt%3Aweight%20%26lt%3B%26lt%3B%20get%20format%20)%3B%0Adt%3Aweight%20%26lt%3B%26lt%3B%20dtformat%3B%20(%3CFONT%20face%3D%22arial%20black%2Cavant%20garde%22%20color%3D%22%23FF0000%22%3E%3CSTRONG%3EThis%20is%20not%20working%3C%2FSTRONG%3E%3C%2FFONT%3E)%0AShow(%20dt%3Aweight%20%26lt%3B%26lt%3B%20get%20format%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-631224%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Dezimalstellen%20in%20der%20%C3%9Cbersichtstabelle%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-631224%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHier%20ist%20meine%20altmodische%20Art%2C%20mit%20dem%20Problem%20umzugehen.Ich%20bin%20mir%20sicher%2C%20dass%20andere%20eine%20einfachere%20M%C3%B6glichkeit%20haben%2C%20damit%20umzugehen.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%5Cbig%20class.jmp%22%20)%3B%0Adtformat%3D%20char(dt%3Aweight%20%26lt%3B%26lt%3B%20get%20format)%20%3B%0A%2F%2F%20Show%20the%20current%20format%0AShow(%20dt%3Aweight%20%26lt%3B%26lt%3B%20get%20format%20)%3B%0A%2F%2F%20Change%20the%20format%20and%20display%20the%20change%0Adt%3Aweight%20%26lt%3B%26lt%3B%20format(%22engineering%22)%3B%0AShow(%20dt%3Aweight%20%26lt%3B%26lt%3B%20get%20format%20)%3B%0A%2F%2F%20Set%20the%20format%20back%20to%20the%20original%20format%0Aeval(parse(%22dt%3Aweight%20%26lt%3B%26lt%3B%20%22%20%7C%7C%20dtformat%20%7C%7C%20%22%3B%22%20))%3B%20%0AShow(%20dt%3Aweight%20%26lt%3B%26lt%3B%20get%20format%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-40318%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EDezimalstellen%20in%20der%20%C3%9Cbersichtstabelle%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-40318%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHallo%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIch%20fasse%20eine%20JMP-Datentabelle%20zusammen.%20In%20der%20%C3%9Cbersichtstabelle%20m%C3%B6chte%20ich%2C%20dass%20die%20Spalten%20Dezimalstellen%20bis%204%20haben.%3C%2FP%3E%3CP%3EAllerdings%20schneidet%20jmp%20alles%20nach%20dem%20Komma%20ab.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22code2.JPG%22%20style%3D%22width%3A%20519px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22code2.JPG%22%20style%3D%22width%3A%20519px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22code2.JPG%22%20style%3D%22width%3A%20519px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F6434i651C2CFF1F7AE786%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22code2.JPG%22%20alt%3D%22code2.JPG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EWenn%20ich%20versuche%2C%20das%20Format%20f%C3%BCr%20eine%20Spalte%20mit%20jsl%20abzurufen%2C%20wird%20mir%20angezeigt%2C%20dass%20das%20Format%20leer%20ist.%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%3AName(%22Median(A)%22)%26lt%3B%26lt%3B%20get%20property(%22Format%22)%3B%2F%2FEmpty%0Adt%3AName(%22Median(A)%22)%26lt%3B%3CSET%20property%3D%22%22%3E%3C%2FSET%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDas%20Anwenden%20des%20Formats%20%C3%BCber%20Code%20funktioniert%20nicht.%3C%2FP%3E%3CP%3EWenn%20ich%20dies%20jedoch%20manuell%20%C3%BCber%20das%20Dialogfeld%20%E2%80%9ESpalteninformationen%E2%80%9C%20durch%20Angabe%20von%20Dezimalstellen%20mache%2C%20funktioniert%20es.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIch%20habe%20ungef%C3%A4hr%2050%20Spalten%20und%20m%C3%B6chte%20dieses%20Dezimalformat%20codieren%2C%20nachdem%20ich%20sie%20ausgew%C3%A4hlt%20habe.%3C%2FP%3E%3CP%3EJede%20Hilfe%20wird%20sehr%20gesch%C3%A4tzt.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-40318%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3EMassenanpassung%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EQualit%C3%A4ts-%20und%20Verfahrenstechnik%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Choose Language Hide Translation Bar
rahulsmils
Level III

decimal places in summary table

Hi, 

 

I am summarizing a jmp data table. In the summary table, I want the columns to have decimal places till 4.

However, jmp truncates everything after the decimal point.

code2.JPG

When I try to retrieve the format for a column using jsl, it says the format is empty.

dt:Name("Median(A)")<< get property("Format");//Empty
dt:Name("Median(A)")<<Set property("Format", {"Scientific",12,2});//Scriptable[] but no change

 

Applying format through code doesn't work.

However, if I do this manually through column info dialogue box, by specifying decimal points, it does work.

 

I have like 50 columns and I wish to code this decimal format after selecting them.

Any help will be greatly appreciated.

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: decimal places in summary table

Get Property and Set Property are not the functions to use for the setting and retireving formats.  The "Format" and "Get Format" messages are used.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
Show( dt:weight << get format );
dt:weight << Format( "Fixed Dec", 12, 6 );
Show( dt:weight << get format );
Jim

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: decimal places in summary table

Get Property and Set Property are not the functions to use for the setting and retireving formats.  The "Format" and "Get Format" messages are used.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
Show( dt:weight << get format );
dt:weight << Format( "Fixed Dec", 12, 6 );
Show( dt:weight << get format );
Jim
rahulsmils
Level III

Re: decimal places in summary table

Perfect, works! Thanks.

lazzybug
Level III

Re: decimal places in summary table

Hi @txnelson , can you tell how to apply the get format into a new column? for example 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
dtformat= dt:weight << get format );
dt:weight << dtformat; (This is not working)
Show( dt:weight << get format );
txnelson
Super User

Re: decimal places in summary table

Here is my old school way of handling the issue.  I am sure others may have a more straightforward way of handling it.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
dtformat= char(dt:weight << get format) ;
// Show the current format
Show( dt:weight << get format );
// Change the format and display the change
dt:weight << format("engineering");
Show( dt:weight << get format );
// Set the format back to the original format
eval(parse("dt:weight << " || dtformat || ";" )); 
Show( dt:weight << get format );
Jim