Hello,
Quick question:
How do I reference a field in a self join? I have a AOT query which I am building a data provider for.
The query is as follows:
Now I have a self join on Ecorescategory to get the category and parent category which is in the field 'Name'.
My DP uses RecordInsertList however in the query run I do not know how to reference it and the name I have given it in the query does not work for the table.
ItemVariantView ItemVariantView = _queryRun.get(tableNum(ItemVariantView)); ProductPricingReportTempTable.ItemId = ItemVariantView.ItemId; ProductPricingReportTempTable.VariantId = ItemVariantView.VariantId; PriceDiscTable priceDiscTable = _queryRun.get(tableNum(PriceDiscTable)); ProductPricingReportTempTable.AccountRelation = priceDiscTable.AccountRelation; ProductPricingReportTempTable.Amount = priceDiscTable.Amount; ProductPricingReportTempTable.Currency = priceDiscTable.Currency; ProductPricingReportTempTable.FromDate = priceDiscTable.FromDate; ProductPricingReportTempTable.ReasonCode = priceDiscTable.ReasonCode; ProductPricingReportTempTable.ToDate = priceDiscTable.ToDate; EcoResCategory ecoResCategory = _queryRun.get(tableNum(EcoResCategory)); ProductPricingReportTempTable.Category = ecoResCategory.Name;
Hope that makes sense?
*This post is locked for comments