HI all, I used [record.COPY] function to copy filtered record from “Sales Invoice Header” to a copy of this table. But when I try to use FIND function on temporary table it don’t work! The temporary table seems to be empty. Instead, immediately after, if I call a form and use the temporary table in Tableview property of the form, it works! WHY??? [:(]
After the record.COPY you have to use a record.insert! Copy does not insert a record!!! Regards, Frank
Thanks!
Hi Frank. Don’t WORK. Other?
Looking at your post it is a selection of Sales Header Records you want to copy to the temp table?. You will have to do a repeat until to insert the sales headers one at a time, then you should be able to do a Setrange and Find. Puzzled as to why you would want to copy the Sa;les Headers to a Temp table. Give us an Idea of what you are trying to do and there may be a better way!
Hi David, I want copy all records of a specific customer in Sales Invoice Header in a temporary table. After this I want delete some record in temporary table using UNTIL and REPEAT but when I try using TemporaryTable.SETRANGE and TemporaryTable.FIND(’-’) it doesn’t work. The table is empty. When I use TemporaryTable.TRANSFERFIELDS (not TemporaryTable.COPY) it works! WHY?
TempSalesInvHeader.RESET; TempSalesInvHeader.DELETEALL; SalesInvHeader.SETCURRENTKEY("Sell-to Customer No.","No."); SalesInvHeader.SETRANGE("Sell-to Customer No.",YourCustNo); IF SalesInvHeader.FIND('-') THEN REPEAT TempSalesInvHeader := SalesInvHeader; TempSalesInvHeader.INSERT; UNTIL SalesInvHeader.NEXT = 0;
Thank you. I did not know that temp tables are copy of structure and data of real table.