How to set range

hi, how to filter records based on last 2 charcters of a field ? when we use wild card it is not filtering properly ?. Can some body help me. regards Sarukai

What function are you using to filter? SETRANGE or SETFILTER? You need to use SETFILTER in order for wildcards to work.

Let’s say you have the following values in your code field to be filtered: 10000 10010 12110 13210 The filter expression ‘*10’ filters on the last three records according to their last to characters. Using C/AL code you should filter like SETFILTER(field,’%1’,’*10’); ‘*10’ can be represented by a variable. This should do the job. If not please specify you special case with more details

Hi beaver, This is working fine. Thanks. regards, Sarukai