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?