cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Pro extension simulates Bayesian Optimization runs. Prediction formulas stand in for experimental results. Run simulations and compare results. Download and use the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
lcpaul41
Level I

JSL: Update Locked Number Box Value From User Input

Hello, I am looking for a way to display an updated value (date) on JMP application. I feel like there should be a simple solution here but am struggling to find it.

 

In the Image below, I have set up a time filter for data table when you press the "Custom" button. After the Data range is entered by user, I want the locked Number Boxes to display the Start and End date values which were selected. 

 

lcpaul41_0-1688666381773.png

 

m_TimeCustomPress=Function({this},
// This function is called when the button is pressed
name = this << Get Button Name;

dt RAW_ALL = Open (//file location);

 

StartTime = Col Min (dt RAW_ALL:DATE);
EndTime = Col Max (dt RAW_ALL:DATE);
 
CustomTimeWindow = New Window("Select Time Frame",
<<Modal,
Panel Box( "Data Range",
Lineup Box( N Col( 2 ),
Text Box( "Start" ),
neb1 = Number Edit Box(
StartTime,
-1,
<<Set Format( Format( "m/d/y" ) ),
<<Set Minimum( StartTime ),
<<Set Maximum( EndTime)
),
Text Box( "End" ),
neb2 = Number Edit Box(
EndTime,
-1,
<<Set Format( Format( "m/d/y" ) ),
<<Set Minimum( StartTime),
<<Set Maximum( EndTime )
)
)
),
 
H List Box(
Button Box( "OK",
StartTime = neb1 << Get;
EndTime = neb2 << Get;
 
//???
StartTimeDisplay = neb1 << Set;
EndTimeDisplay = neb2 << Set;
 
),
Button Box( "Cancel" )
)
);

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: JSL: Update Locked Number Box Value From User Input

If I'm understanding correctly and StartTimeDisplay is what you're calling the locked number box, you'd want to modify the lines to:

StartTimeDisplay << set (StartTime);
EndTimeDisplay << set (EndTime);

as per the syntax in the Scripting Index.

Jed_Campbell_0-1688670367345.png

 

View solution in original post

1 REPLY 1

Re: JSL: Update Locked Number Box Value From User Input

If I'm understanding correctly and StartTimeDisplay is what you're calling the locked number box, you'd want to modify the lines to:

StartTimeDisplay << set (StartTime);
EndTimeDisplay << set (EndTime);

as per the syntax in the Scripting Index.

Jed_Campbell_0-1688670367345.png

 

Recommended Articles