Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

Electronic Reporting - List is empty at 'model/CustomerTransaction/Settlement'

Posted on by 60

I'm working on configuring a formula in Electronic Reporting and need some help. Specifically, I want to modify the formula so that if a value is empty, it displays as blank instead of causing an error.

Currently, the formula in Cell<Prepayments_Date_Value> = model.CustomerTransaction.Settlement.OffsetTransDate is set as:

model.CustomerTransaction.Settlement.OffsetTransDate

The issue I'm facing is that if a Free Text invoice is not settled, users are unable to view invoices due to the following error:

"Evaluating binding of format component Folder/Free text invoice/Invoice/Totals/Prepayments/Prepayments_Date_Value."

"Evaluating expression for path 'model/CustomerTransaction/Settlement/OffsetTransDate'. List is empty at 'model/CustomerTransaction/Settlement'"

I've attempted a few solutions, but none have worked. Can anyone suggest a formula that would handle empty values properly and prevent this error?

  • Suggested answer
    Adis Profile Picture
    Adis 2,326 on at
    Electronic Reporting - List is empty at 'model/CustomerTransaction/Settlement'
    Hey,
     
    I would suggest to try the following:
     
    In your screenshot (1), the range is not bound, whereas in my screenshot (2) the range is bound to "model.CustomerTransaction.Settlement"
     
     
     
    If that doesnt work, then please replace my formula in the "Enabled" field with the one suggested from Alireza.
     
    Kind regards, Adis
     
  • MS-29042149-0 Profile Picture
    MS-29042149-0 60 on at
    Electronic Reporting - List is empty at 'model/CustomerTransaction/Settlement'
    Hi Adis,
     
    I tried adding the formula to the Range <Prepayments>?, however I still get the exact same error. 
     
     
     
    I also tried adding the formula here, but I still received the same error unfortunately:
     
     
  • Verified answer
    Alireza Eshaghzadeh Profile Picture
    Alireza Eshaghzadeh 11,806 Super User 2024 Season 2 on at
    Electronic Reporting - List is empty at 'model/CustomerTransaction/Settlement'
    Hi,

    When working with ER, you need to consider both model mapping and the format designer. In this case, the model mapping uses the CustSettlement table for mapping. This means it can be empty if there are no records in this table, which explains the error message you received.

    I recommend following this post by Microsoft to gain a better understanding of how to troubleshoot such issues when dealing with Record or Record list:

    Inspect the configured ER component to prevent runtime issues - Finance & Operations | Dynamics 365 | Microsoft Learn


    You can evaluate to use AllItemsQuery for CustSettlement and creating a custom node and map to Customer settlement(Settlement) = CustInvoiceJour.'<Relations'.'$CustomerTransaction'.'$CustSettlement' 
    $CustSettlement = ALLITEMSQUERY(CustInvoiceJour.'<Relations'.'$CustomerTransaction'.'<Relations'.CustSettlement)
    while it can be several approach to avoid empty list.
    ALLITEMSQUERY ER function - Finance & Operations | Dynamics 365 | Microsoft Learn

    Another approach to fix this issue is using the format designer in Excel. On the Prepayment node, Microsoft has already added logic to enable the node with the condition AND(COUNT(model.CustomerTransaction.Settlement)>0, model.CustomerTransaction.SettleAmountCur<>0). This means that the node will be enabled if there are transactions in the Settlement and the amount is not zero, which should be sufficient.
  • Suggested answer
    Adis Profile Picture
    Adis 2,326 on at
    Electronic Reporting - List is empty at 'model/CustomerTransaction/Settlement'
    Hi,
     
    This is the formula you need to apply on "Enabled" in the marked ranged:
     
    NOT
    (
        ISEMPTY(model.CustomerTransaction.Settlement)
    )
     
    Keep in mind that if the Settlement (Record List) is empty, the whole range, i.e. all excel cells under this range will be deleted
    so that the below cells will move up. I guess this is okay, if not, then the enabled logic needs to be wrapped in an IF formula in the cells below.
     
     
     
     
     
    To explain the error message:
     
     
    "Evaluating binding of format component Folder/Free text invoice/Invoice/Totals/Prepayments/Prepayments_Date_Value." (see 1)
    ER tries to evaluate the code in the "Enabled" field for this cell (see 1)
     
     
    However, it cannot do this because the list model.CustomerTransaction.Settlement (List) is empty (see 2), hence, there is no data to evaluate thats why you get this error message:
    "Evaluating expression for path 'model/CustomerTransaction/Settlement/OffsetTransDate'. List is empty at 'model/CustomerTransaction/Settlement'"
     
     
     
     
    The same scenario you have under Totals\Totals_HeaderNoteLine, but in this case the MS configuration has check on the range level (see 1)
    There are also checks for the ranges under (2), depending on the data type, as the checks need to be different for a string, date field or a list.
     
     
     
     
    Kind regards, Adis
     
     
    If your question was answered, please mark the appropriate reply as answered

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.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,902 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,297 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans