Performing Filter on a retrieved record

Hello All, I have a parameter that has the same format as a ‘filter string’ e.g 4|5|Z what I would like to do is check using this string against a field in my received record. It seems that I can perform a 2nd filter on this record. Item.SETFILTER(Item.ArtCode,InvtSetup.ArtCode); //SETFILTER IF (InvtSetup.ArtCode) OR (NOT Item.FIND) THEN // IF ARTCOD = 4or5orZ InvtSetup.ArtCode:= ItemMaster. ArtCode; Item.SETFILTER(Item.ArtCode,’’); //CLEAR FILTER Are there any draw backs? Or things that I should look out for. Or is there a better way. (Please don’t say write lines of code). Regards Graham

Hey Graham, in our navision version (DE2.50) this way doesn’t work. If i want to set a filter to a field i need to use the way item.SETFILTER(fieldX, ‘%1|%2|%3’, value1 + ‘*’, value2, value3); Filtersigns like the pipe or asterixs need to be added in the way shown above. If you want the user to set the filtervalues in one single string you have to check this string for the filtersigns like counter = 1; WHILE STRLEN(X) > 0 DO BEGIN place := STRPOS(X, ‘|’); IF place > 0 THEN valueX(counter) := COPYSTR(X, 1, place - 1); X := DELSTR(X, 1, place); END; in this example valueX is a variable of X dimensions after that you need to set the filtervariable like: CASE counter OF 1: item.SETFILTER(filed1, ‘%1’, valueX(1)); 2: item.SETFILTER(field1, ‘%1|%2’, valueX(1), valueX(2)); and so on… END; okay, this may look a little strange, and perhaps there are better ways to approach the aim. But it is a first idea… hope this helps