Set text value to StringEdit control on Form without using Datasource

Now, I want to set value for a EditString in form. I have overrided modified method of EditString and I have a problem that the data not display in there

this is my code:

public boolean modified()
boolean ret;
DirPartyPostalAddressView dppav;
String255 address;

while select Address from dppav where dppav.RecId == DirPartyTable::findByName(VendInvoiceInfoTable_PurchName.text()).RecId && dppav.Partition == DirPartyTable::findByName(VendInvoiceInfoTable_PurchName.text()).Partition
address = dppav.Address;

ret = super();

return ret;

Can You help me please, Thanks All

Is PurchAddress bound to a data source? If it is, set the value to the data source field.
If it isn’t first check if your select finds any address at all? Using PuchName foir the search is suspicious, furthermore the control seems to be bound to a data source, therefore you should refer to it by vendInvoiceInfoTable.PurchName.
Also, why do you use while select if you ignore all values except the last one? Is a waste of resources.
And one more thing - your code will run even if the modification fails (super() returns false).

use the code as display method in VendInvoiceInfoTable.