Passing values between two forms using args


Below using below sample codes we can any format of value/text to other form.

1) Write the below code from where u want to pass the value. like in “clicked” method

// If we want pass just simple string we can use ‘parm’ method of ‘Args’ class

    args.parm( strValue.text() );

    // We also can pass enum value

    args.parmEnum( NoYesEnumValue.selection() );

    args.parmEnumType( EnumNum( NoYes ) );

    // and also can pass a cursor pointing to some record (in our case it is EmplTable )

    args.record( EmplTable );

2) to get the values in second from use below code in init() method

// Check for passed arguments
if( element.args() )
// get string parameter
strValue.text( element.args().parm() );

// get enum parameter
if( element.args().parmEnumType() == EnumNum( NoYes ) )
NoYesEnumValue.selection( element.args().parmEnum() );
// get object parameter
if( element.args().parmObject() )
formBParams = element.args().parmObject();

refer below link for more details:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s