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.
Override the modified method for the lookup field. Assign the value of lookup field to FieldX.
public boolean modified()
ret = super();
TableA.FieldX = Table.LookupField
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…
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.
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.
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.
i got good knowledge on modified field…thank u…
public void modifiedField(fieldId _fieldId)
if (_fieldId == fieldnum(TableName, LookupField))
TableName.FieldX = TableName.LookupField