Announcements
No record found.
We are experiencing an issue while running an Electronic Reporting (ER) format for not posted Free Text Invoices in Dynamics 365 Finance & Operations (D365FO). The report fails with the following error message:
"An error occurred during the 'Format mapping' run. Evaluating expression for path 'TaxTrans/ExemptCode'. List is empty at 'model/LineItem/TaxTrans'"
Model Mapping:
TaxTrans
LineItem
Format Mapping:
ExemptCode
Added a Condition to Prevent Empty List Errors:
IF(COUNT(@.TaxTrans) > 0, IF(@.TaxTrans.ExemptCode<>"", @.TaxTrans.ExemptCode, ""), "")
Attempted Using ALLITEMSQUERY to Retrieve Tax Transactions:
ALLITEMSQUERY
ALLITEMSQUERY(CustInvoiceJour.'$CustInvoiceTrans_OrderByLineSeqNum'.'$TaxTrans_All')
Tried Using FILTER to Process Only Non-Empty Tax Transactions:
FILTER
FILTER(@.TaxTrans, COUNT(@.TaxTrans) > 0)
Considered Returning an Empty List When TaxTrans is Empty:
IF(COUNT(@.TaxTrans) > 0, @.TaxTrans, EMPTYLIST(@.TaxTrans))
✅ How do we safely reference TaxTrans.ExemptCode in the format mapping to prevent the "List is empty" error when TaxTrans has no records?
TaxTrans.ExemptCode
Additional Questions:
Any guidance or best practices would be greatly appreciated! Thanks in advance for your support. 🙏
If this helped, please mark it as "Verified" for others facing the same issue
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Giorgio Bonacorsi 620
André Arnaud de Cal... 521 Super User 2026 Season 1
CP04-islander 430