Modify a field in more records at one time

Hello i have a table where a field (price) is 0,00 DM. Now i want to modify the price, depending the value of 2 fields (ITEMNUMBER, SIZE). i want to do this with an nonprinting report. A window should open where the ITEMNUMBER and the SIZE is show, then i want fill in the price for this combination. I create a window, but if there are 10 records with the same ITEMNUMBER and SIZE i must fill the price for each record. Any idee. Sorry for this english. Thank you lothar knichel

Table.SETRANGE(…); Table.SETFILTER(…); Table.MODIFYALL(“Field Name”, SetFixedValue); Business Applications Programmer Sertified Navision Developer SIA “Sintegra” Latvia

Hello Alexei Pavlov, thank you for answering. Perhaps i didn´t discribe my problem exactly. 1. ITEMNUMBER and SIZE are not the primary keys. This combination exist in this table more then one time. 2. A dialog windows open and show me ITEMNUMBER(4711) and SIZE(9) then i fill in the price then i press RETURN,so far so good. Then all combinations in the table should get this price, but they don´t. If the same combination exist, i must fill the price again and again. 3. The dialog windows then should show the next ITEMNUMBER(5001) and SIZE(8) an so on. Thank you lothar knichel

Hi Lothar The folowing code is not tested, but i should work. The table must use a key have ITEMNUMBER and SIZE as the last fields. Window.OPEN(New prize #1########); IF FIND(’-’) THEN REPEAT NewPrizeVar := Window.INPUT(1,NewPrizeVar); SETRANGE(ITEMNUMBER,ITEMNUMBER); SETRANGE(SIZE,SIZE) REPEAT Prize := NewPrizeVar; MODIFY; UNTIL NEXT = 0; SETRANGE(ITEMNUMBER); SETRANGE(SIZE); UNTIL NEXT = 0;

What Alexia has suggested has nothing to do with the primary key. It will modify the records exactly as you need them to be. It will modify ALL records that match the filters you set. Regards Taylor McCartney Development Specialist CSB Systems Edited by - tmccartney on 2001 Oct 24 17:11:15