- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Insert user input into a basic calculation in jsl
Hi all,
I want to ask user to insert number of months for analysis. This value will be used in equation to select the last "insert months" of rows and then subset.
I prepared following part at the beginning, but this leads to an error.
Names Default To Here( 1 );
nw = New Window("", <<Modal, <<Return Result,
HListBox(
Panel Box("How many months would you like to analyze?",
Lineup Box(
2,
nom = Number Edit Box( 0 , <<Set Increment(1), <<Set Show Spin Box(1)),
)
)
));
time = nom << get;
dt1 = Open( "file link" );
// Select last 180 days in Seconds and Subset
dt1 << Select Where(Contains(:Run Type, "Prod") & :Date Time >= (:Date Time[N Rows (Current Data Table())]-(60*60*24*30*time)));
dt1 << Subset( Output Table( "Subset of file" ), Selected Rows(1), Selected columns only( 0 ) );
and the error is:
Already thanks for you help..
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Insert user input into a basic calculation in jsl
Because the window is closed after pressing OK you will loose the reference to Number Edit Box. Because you are using << Return Result you can use this
time = nw["nom"];
-Jarmo
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Insert user input into a basic calculation in jsl
Because the window is closed after pressing OK you will loose the reference to Number Edit Box. Because you are using << Return Result you can use this
time = nw["nom"];
-Jarmo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Insert user input into a basic calculation in jsl
Thank you very much. Worked perfectly