Hi,
I had the same problem and i solved it with the following method :
str fieldListRange(FieldName _fieldName, str _value)
{
container c;
int countNumber;
str rangeValue;
c = str2con(_value,
“,”);
for (countNumber = 1; countNumber <= conLen(c); countNumber++)
{
if(rangeValue)
{
rangeValue +=
" || ";
}
rangeValue +=
“(” + _fieldName + " = “” + strLRTrim(any2str(conPeek(c, countNumber))) + “”)";
return rangeValue;
}
And in your queryBuildRange :
QueryBuildRange.value(strFmt("(%1) || (field1 = %2)", fieldListRange(field1, parameter1), SysQuery::valueEmptyString()));
It’s not beautiful but it’s working. If not try to replace field1 by fieldstr(TableId, field1)
QueryBuildRange.value(strFmt("(%1) || (%2 = %3)", fieldListRange(fieldStr(YourTableId, field1), parameter1), fieldStr(YourTableId, field1), SysQuery::valueEmptyString()));
On axaptapedia they said : http://www.axaptapedia.com/index.php/Expressions_in_query_ranges
"Whilst in standard queries you can specify “AA*” or “A,B,C” as criteria, and they will be parsed by Axapta and sent through correctly to the database, these will simply be passed directly through when using the Query Expressions engine. As a result, they will not return the expected results. On a related noted, the use of ‘like’ is not supported, so there is no way to use wildcards in any form. "
I hope this help.