Hi!
I need some help about a SETFILTER.
I have an Itemrecord that I want to filter by Class in such way that my Itemrecord included item that have these (several) class value.
What could be equivalent to one of the following SQLquery
select * from Item where Calss in ('class1', 'class2'..... , 'classn')
OR
select * from Item where Class = 'class1' OR Class = 'class2'..... OR Calss = 'classn'
I want some thing like that in my CODEUNIT
ItemRecord.SETFILTER("Class", and I do not no how to handle the rest :oops: );
best ergards
Nasser
0
Comments
second try following:
if you need the filter dunymicly, you can fill a variable and use the variable as filter
Regards
RIS Plus, LLC
A huge pain, but it works.
Usually people do this kind of thing when they want to do something like a SQL join ( or a select * where in) in NAV, but they can't.
For small data sets, it makes sense to just loop through all of the items, and insert them into a temporary record if they match your criteria.
For larger data sets, your best option is use to use ADO. When using ADO remember to build your SQL string in NAV and not use a stored procedure.
Getting into the mess of managing stored procs. just so you can make one query is a huge waste of time.