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);
}
}
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);
}
}
Thank you very much for your help.
ReplyDeleteYou are the best!