How to modify the dialogfield when other dialogField is changed on Runbase

Hi All,

Today, I am demonstrating on How to modify the dialogfield when other dialogField is changed on RunBase Dialog.

Firstly, I want to give a brief introduction about RunBase Class.
This Class is used to schedule the batch jobs. So, Adding lookup form
to RunBase Dialog starts with Class Declaration.

class SampleComboDialog extends RunBaseBatch

DialogRunbase dialog;
DialogField nameField;
DialogField messageField;


In the above class declaration, I declared dialog object of type DialogRunbase & nameField of type DialogField, messageField of type DialogField and then I overrided dialog method.

Don’t forget to put dialog.allowUpdateSelectCtrl(true) in dialog() method
protected Object dialog()

FormStringControl control;
dialog = super();
namefield = dialog.addField(extendedTypeStr(Name));
control = namefield.control();
messageField = dialog.addfield(extendedTypestr(Description));
return dialog;


You have to override the lookup() method with lookup form being as parameter.

private void nameLookup(FormStringControl _control)
SysTableLookup sysTableLookup;
QueryBuildDataSource qbds;

Query query = new Query();
qbds = Query.addDataSource(tableNum(SampleAIFTbl));
sysTableLookup = SysTableLookup::newParameters(tableNum(SampleAIFTbl), _control,true);
sysTableLookup.addLookupfield(fieldNum(SampleAIFTbl, Name), true);


Binding this nameField with FormStringControl, used registerOverrideMethod to be used as overridden method by dialog object.

dialogSelectCtrl() method shows the value passed to it whenever its control selected by user.

public void dialogSelectCtrl()
str msg = nameField.value();


//Simple run method
public void run()
info(strFmt(” the result is %1″, nameField.value()));

It displays the value selected in lookup but it requires to initialization of RunBase Class Object. This is has to be written in main method of respective class.

public static void main(Args _args)
SampleComboDialog sampleComboDialog;
sampleComboDialog = new SampleComboDialog();


So, I compile & run it and here is the Output.

When I select some value from lookup and select Description Dialog field, it will show as it below.



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

%d bloggers like this: