web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Electronic Reporting/ER Check for empty values different between model and format mapping

(1) ShareShare
ReportReport
Posted on by 133
Hi Dynamics Community,
 
I'm encountering a problem that is driving me crazy with Electronic Reporting. Again. ;) 
 
I have this formula for a calculated field in the model mapping's data source:
$CalculatedFieldName2 = 
IF(
    NOT(ISEMPTY('$CalculatedFieldName1')),
    '$CalculatedFieldName1'.'<Relations'.'<Documents',
    EMPTYLIST('$CalculatedFieldName1')
)
 
My intention is to access the Note-field under '<Documents'.
 
This worked out well before I added the check for empty values  (ISEMPTY and EMPTYLIST). I could then reference the data structure under '$CalculatedFieldName1'.'<Relations'.'<Documents' when referencing this calculated field, $CalculatedFieldName2'.
 
When I add the check for empty values, the model mapping will instead interpret that I'm referencing the datastructure under $CalculatedFieldName1' as I reference $CalculatedFieldName2'. However, the format mapping is still interpreting the links as being relative to $CalculatedFieldName1'.'<Relations'.'<Documents'.
 
Tldr: From what I can tell, the model mapping will interpret links to this object as being links to $CalculatedFieldName1, while the format mapping will interpret it as a reference to CalculatedFieldName1.'<Relations'.'<Documents'
This has the consequence that I cannot implement a check for empty values this way, because I get error messages from either the model mapping validation or the format mapping validation.
This seemingly assymetric behaviour between the two mappings has made it impossible for me, as it seems, to interpret this check for empty values. Does someone have an idea of how I can perform the check for empty values without creating a deviation in interpretations between the model mapping and the format mapping?
Categories:
I have the same question (0)
  • Dan P Profile Picture
    133 on at
    Electronic Reporting/ER Check for empty values different between model and format mapping
    Thanks for a very fast answer,  ! Ok, I'll try that, then of course update as a solution if I can make it work.
     
    Edit: I think that solved it, excellent. Thanks again!
  • CA Neeraj Kumar Profile Picture
    1,582 on at
    Electronic Reporting/ER Check for empty values different between model and format mapping
    Hi @Dan P
     
    Can you please share the error message also, along with the formula written in $CalculatedFieldName1?
     
    Regards,
    Neeraj
  • Verified answer
    CA Neeraj Kumar Profile Picture
    1,582 on at
    Electronic Reporting/ER Check for empty values different between model and format mapping
    Hi @Dan P,
     
    Let me answer both of your questions:
    1) Why CalculatedFieldName2 is showing reference of CalculatedFieldName1?
    The reason is since you are using IF function and passing the CalculatedFieldName1 as 1st argument in True condition, it is just reflecting that in calculated field, but in reality it is referring to both True and False arguments.
     
    2) Why it is not working after adding Empty Value conditions.?
    This is happening due to mismatch of metadata for both True and False condition. You can add a separate table of DocuRef as add root. And then pass in the formula as EMPTYLIST(DocuRef) instead of EmptyLIST($CalculatedFieldName1).
     
    It will make sure the Final output from this IF function makes an list having metadata of DocuRef table. It should work for you. Please make necessary changes and let me know the output.
     
    If this helped, please mark it as "Verified" for others facing the same issue Keep in mind that it is possible to mark more than one answer as verified
     
    Regards,
    Neeraj Kumar
    Author of the book: Electronic Reporting - The Hidden Gem

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 895

#2
Sohaib Cheema Profile Picture

Sohaib Cheema 811 User Group Leader

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 787 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans