In this case I'm creating a new Journal from the Table VendInvoiceInfoLine. In this table I have a lookup field where i select the Intent Letter that receives the request, and another field with the Total Amount of the Journal. Then I have the table IntentLetter where are stored all the intent letter and they have a field called RemainingAmount. I need to compare the Total Amount of the Journal with the Remaining Amount of the intent letter, and check if the first one is lower than the second in order to proceed with the registration of the Journal. I think I need to use the While select statement to access the right data, maybe using RecId and a join, but I really don't know how to proceed and what's the right way to do it. Can anyone help? Thank you very much!