Application Newbie - run script from Number Edit BoxI have this piece of script which allows a user to input a number to fill a column. It will ultimately be used to format the data being charted.
When I create a number edit box in application builder , it's not obvious to me what the script should be within the Number edit box Properties (if indeed, that is where i enter the script)
I assume i lose the top 8 lines, as the creation of the box is already done, but the bottom 3 lines don't work for me.
thanks in advance.
win = New Window( "Set a Value",
<<MODAL></MODAL>
ScriptingRe: Application Newbie - run script from Number Edit BoxIn Application Builder right-click on your number edit box and select Scripts > Script:

This will create the following script in the Scripts tab:
variable_nebScript=Function({this},{numEditValue},
// This function is called when the number edit value is committed
numEditValue = this << Get;
);
This script is also referenced in the properties panel (rhs of screen)

Note - there are two kinds of behaviors you can write functions for:
Script: runs after the user changes focus from the number edit box.
Number Changed: runs after every character is entered.
Re: Application Newbie - run script from Number Edit BoxThaks Jim,
to be clear, that whole code worked fine for me when run from the data table, I'm just struggling on what the code should be, and where i write it, in application builder, to customise a number edit box that I've added graphically.
thanks again.
Re: Application Newbie - run script from Number Edit BoxYour code works fine for me......as long as the current data table has a column called "P1F012 ETLag"
I added just a couple of items, that should not have any impact on the code, if the Current Data Table is actually the table you have last activated and it has the column "P1F012 ETLag"
win = New Window( "Set a Value",
<<MODAL></MODAL>