cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
0 Kudos

Allow common formatting types on Number Col Edit Box

A number edit box can be easily formatted as a date by using the following 

numbox = Number Edit Box( 0 ,<< set format(format("ddMonyyyy")), << set(Today()));
 
NW1 = New Window( "Example", numbox );

However, in order to achieve a similar result with a number col edit box, the formatting requires the user to pass a number as an argument to the format function. This is not intuitive and the user is left to guess what might or might not work. I would like to request the number col edit box also be provided the functionality to accept commonly known formatting types as a number edit box. 
Here is an example 

// Using Number Col Edit Box 

nR = 7; 
NEB1 = Number Col Edit Box("StartDate",Repeat(Today() - 30 * 24 * 60 * 60,nR)); 
NEB1 << set format(format("ddMonyyyy"));

NEB2 = Number Col Edit Box("StartDate",Repeat(Today(), nR ));
NEB2 << set format(format("ddMonyyyy"));

TB1 = Table Box(NEB1,NEB2);
			   
NW = New Window("test",TB1); 

See Format a Number Col Edit Box for discussion.

3 Comments
danschikore
Staff

Number Col Box and Number Col Edit Box will take symbolic formats, but they take the arguments in a list rather than in a Format() statement.  Try this example:

 

// Using Number Col Edit Box 

nR = 7; 
NB1 = Number Col Box("StartDate",Repeat(Today() - 30 * 24 * 60 * 60,nR)); 
NB1 << set format({"ddMonyyyy", 12});

NEB2 = Number Col Edit Box("StartDate",Repeat(Today(), nR ));
NEB2 << set format({"ddMonyyyy", 12});

TB1 = Table Box(NB1,NEB2);
			   
NW = New Window("test",TB1); 

 

These messages should be made consistent with other boxes and the documentation needs to update to reflect the usage options.

Jeff_Perkinson
Community Manager
Status changed to: Yes, Stay Tuned!

We are working on improvements here to make the syntax more consistent for the various Format messages. This will be available in JMP 16.

Jeff_Perkinson
Community Manager
Status changed to: Delivered

In JMP 16 the << Set Format() message will take arguments in a variety of forms:

Set Format("Fixed", 8, 3);
Set Format({"Fixed",8,3});
3) Set Format(Format("Fixed",8,3));

//Note that the argument can also be evaluated, so you can do something like:

box1 << Set Format(box2 << Get Format);