Search This Blog

Wednesday, August 24, 2011

Build Query Ranges with Wild card Ranges

Sample code to retrive Items withe the wild card searches using Query Object

static void WildCardQuery()
{
Query query = new Query();
QueryRun queryRun;
InventTable inventTable;
;
query.addDataSource(tableNum(InventTable)).addRange(fieldNum(InventTable, ItemId)).value("900*, 1790*, 278*");
queryRun = new QueryRun(query);
    while(queryRun.next())
   {
      inventTable = queryRun.get(tableNum(InventTable));
      info(inventTable.ItemId);
   }

}

1 comment:

  1. Thank you very much for your help.
    You are the best!

    ReplyDelete

Thanks for visiting my blog,
I will reply for your comment within 48 hours.

Thanks,
krishna.