Let's learn about how to add two different data source columns range on one column range in AOT Query. also i am covering how can we apply same on X++ query.
Only the point to be consider is we need to use parenthesis correctly and Proper enum name -
DocumentStatus::None.
Apply range on X++ Query.
Override the execute query method of your form Datasource and add below code.
public void executeQuery()
{
this.query.dataSourceTable(tableNum(yourDatasourcename)).clearRanges();
Query query = new Query(this.query());
QueryBuildDataSource TestAllSOLinesView_ds1 = query.dataSourceTable(tableNum(TestAllSOLinesView));
queryBuildRange queryBuildRange = TestAllSOLinesView_ds1.addRange(fieldNum(TestAllSOLinesView, DocumentStatus));
queryBuildRange.value(strFmt('((DocumentStatus == %1) || ((TestConfirmationStatus == "%2")
this.query(query);
super();
}
AOT Range on 2 different date columns
refer below screen shot - I have set the value property with greater than condition on two date column of my data source.
ex - (TestReqShippingDate > TestAllPOLinesView.TestConfirmedShippingDate)
No comments:
Post a Comment