Modified method

Hi, I have one form and having two fields.one is lookup another field is X.Both data types are string. When i’m creating a new record and select a value in the lookup i want show the same lookup value in the field X.

Hi Kola,

Override the modified method for the lookup field. Assign the value of lookup field to FieldX.

public boolean modified()

{

boolean ret;

;

ret = super();

TableA.FieldX = Table.LookupField

return ret;

}

Regards,

Raghavendra.

Hi Raghavendra,

Can i use relation(normal) for that loopupfield… like this anything wrong …what is the diff between for lookup

giving relation and writing modified field…can u explain clearly…

Thanks,

SureSh.

Hi suresh,

The relation can be used where tableA has relation with tableB. (e.g salesId between salesTable and salesLine). By defining the relation on the table, the value populates automatically.

The ‘modified’ method is used where the two fields does not have relation between them. on change in the value of lookup field, the value can be used assigned to FieldX as in above case.

Regards,

Raghav.

Hi Raghavendra,

Means when u change one field value,based on that value second field was populated by using the modified field…

Depend on the only first field…may i correct.

thanks,

SureSh.

Hi Suresh,

By using ‘modified’ method, Right. Although, ‘modified’ method can be used for various other functions. Basically, ‘Modified’ method is overidden to perform specific function during the modification of the particular field.

Regards,

Raghavendra.

Hi raghavendra,

i got good knowledge on modified field…thank u…

Thanks,

SureSh.

public void modifiedField(fieldId _fieldId)
{
super(_fieldId);

if (_fieldId == fieldnum(TableName, LookupField))

{

TableName.FieldX = TableName.LookupField

}

}