while select statement does not select all records


I’ve added one checkbox on my purchTable form. This checkbox is on both purchTable header and purchLines. My question is when i select this checkbox from my header i.e. purchTable and it should get selected for all my purchLine checkboxes. Following below is my code:

while select purchLine
where purchTable.PurchId == purchLine.PurchId
if (purchTable.fixedasset == true)
purchLine.fixedasset = true;



the problem in the above syntax is it is selecting only the last line of the purchLine record. If i put in my select as

“While select firstonly100 purchLine” then it is selecting the first record of my purchLine.

plz help me.

missing purchTable join in the above query.

Thanks Nasheet for the reply.

I tried adding join but still didnt worked.

Where is the location of the code? you should not write it on form. Place a table level method and call that method on the modifiedField (table(purchTable) level method). You should use update_recordset for updating the purchLine and skip the data methods(hoping no logic to be executed in purchLIne.update() based the checkmark field update)

if (this.fixedasset ) // this to added \Data Dictionary\Tables\PurchTable\Methods\modifiedField .


this.updateAssetPurchLine(); // this is the newly added table level method(name can be changed as per your requirement)


void updateAssetPurchLIne()


PurchLine purchLIne;


update_recordset purchLIne

setting fixedasset == true

where purchLine.purchId == this.purchId;