cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
New to using JMP? Hit the ground running with the Early User Edition of Discovery Summit. Register now, free of charge.
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar
zql3050
Level I

how to update the text box when app load

I built a App for data loading from SQL. Here is two Text box for start and end data time select. Now I want to use the current time as the end time once the app running. But I can not achieve it as below shown. Could you show

OnModuleLoad({},
	s = Format( today(), "Format Pattern", "<YYYY><-><MM><-><DD>" );
	txt_endTime<<set text(s);
);
2 REPLIES 2
jthi
Super User

Re: how to update the text box when app load

I don't use application builder but I think you might have to move that outside of OnModuleLoad

jthi_0-1725014231778.png

Or maybe have the string creation inside onmoduleload and setting it outside (after objects have been created)

jthi_1-1725014310080.png

 

-Jarmo

Re: how to update the text box when app load

Agree with @jthi here - OnModuleLoad is basically a pseudo-function to receive arguments from another module at creation time - useful for creating things like launchers that instantiate other modules.

 

Below are the default arguments included in a Module script - anything that uses the symbols created by the Module has to be placed after the thisModuleInstance << Create Objects; line:

 

// This special function will receive parameters passed to CreateInstance()
OnModuleLoad({},
);

thisModuleInstance << Create Objects;

// After this point your module instance objects have been created
// and can be referred to by name (for example, "Button1").