I have to make changes to the item table due to a new price list from a vendor. Some articles must be added, for other articles only some changes have to be made. For this reason I used in the past a non-printing report using the commands “modify” or “insert”. However, when changing a field in a record other fields of that record were made blank! I want to try now by using to non-printing reports. I succeeded to make changes and keep other valuable fields intact for excisting items, using the “get” and “modify” commands. But in the second report, I use "If not GET…then… and the “insert” command at the end. Unfortunatly it doesn’t work: an error tells me that the "item No. already exists! Can someone give me some suggestions? Thanks
Hi Danny, I’m not too clear on what you are trying to achieve but I’ll assume that you are simply trying to create a few new items and update some existing ones. Also, I assume that you are using a report because you need to apply some predifined transformation to the data. It would be useful to know what you commands you are issuing in your report. This might shed some light on the fields being blanked out. Perhaps you could copy some of your code here. As for the problem of records already existing when inserting records then it is worth checking that you have set the primary key to a non-blank unique value and that you are not inserting it twice. Regards Simon
Hi Danny, DO you have a reset before you get the record. If not then is the insert statement within the IF condition you have specified. Do you have any setrange statement in the condition loop. Are you doing any other processing of the outside the condition if Yes then you can do the processing and have a modify statement in the else loop. Best regards, Prashanth NCFC, NCMC, NCSD firstname.lastname@example.org
Good morning, Thanks for the help so far. I think I found my problem: the key was not set to the mutual field. Also I changed the insert to “ok:= artikel.INSERT”. I think it’s now alright. I’ve added my report as an attachment.