I have looked everywhere, and there are so many different ways to do this, but I cannot find a complete example. I know it's a rookie question, and I apologize. I have also looked through the AOT, but I got so many search results it was hopeless.
So, I have a form. I have added a data source, and am modifying the executequery() method. I want the form to display records if FieldA (NoYes enum) is set to 1, and when FieldB (a TableGroupAll enum) is set to All (aka, 2).
So, to do it for ONE field, I do this (and it works):
public void executeQuery()
{
QueryBuildRange testQBR;
;
testQBR = this.query().dataSourceName('NameOfMyDataSource').addRange(fieldnum(NameOfMyDataSource,FieldA));
testQBR.value(queryvalue(1));
super();
}
Easy. But I have looked and looked and looked and could not find any example that specifically states how to do this with two fields. I know it has to be simple, and I'm terribly embarrassed to be asking.