Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Electronic Reporting - Insert comment in Formula editor

(3) ShareShare
ReportReport
Posted on by 28

Hi,

Do you know how to add a comment in the Formula editor? 

I want to comment a line and keep the formula without deleting it.

Thanks a lot!

Petya

  • CU05120455-0 Profile Picture
    2 on at
    Electronic Reporting - Insert comment in Formula editor
    LaTeX: This is a standard system for writing scientific documents, especially mathematical formulas. LaTeX provides many commands to create different annotations, from simple to complex annotations.
  • Klara Calabro Profile Picture
    14 on at
    Electronic Reporting - Insert comment in Formula editor
    Hi Petya, Hi Alireza
     
    have you found some solution how to add developer comment in the formula editor without validation error? I have the same requirement.
     
    In X++ we can comment out one or more lines of code with leading characters // or block comment multiple lines of code using the characters /* */ 
     
    But how to do this in electronic reporting? By using this charachters I get the validation error of course. 
     
    Thank you to let us know. 
  • Verified answer
    Alireza Eshaghzadeh Profile Picture
    13,585 Super User 2025 Season 1 on at
    RE: Electronic Reporting - Insert comment in Formula editor

    You can test following formular:

    IF ( model.'Company info'.Name <>"",

    "Comment",

    model.'Company info'.Name)

  • petya.topalova Profile Picture
    28 on at
    RE: Electronic Reporting - Insert comment in Formula editor

    model.Company.Name<>"" -> this I want to comment, so that it is not taken into account, but still kept in the field.

    false -> this should remain and be taken into account.

    thanks a lot!

    Petya

  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    13,585 Super User 2025 Season 1 on at
    RE: Electronic Reporting - Insert comment in Formula editor

    Hi Petya,

    It is possible.

    You can share the formula if you need assistance.

  • petya.topalova Profile Picture
    28 on at
    RE: Electronic Reporting - Insert comment in Formula editor

    Thanks, Alireza,

    I want to keep the formula, but trigger only the "false" statement. Isn't this possible?

    Best regards,

    Petya

  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    13,585 Super User 2025 Season 1 on at
    RE: Electronic Reporting - Insert comment in Formula editor

    Hi Pety,

    You can use false or true instead.

    Please try and give us a feedback if you need assist.

  • petya.topalova Profile Picture
    28 on at
    RE: Electronic Reporting - Insert comment in Formula editor

    It is not what I am looking for. Thanks.

    I just want to keep a code presented in a formula, yet not trigger it.

    For example: model.Company.Name<>"" - I do not want to delete this, just want to leave it and put "false" instead.

  • Verified answer
    Alireza Eshaghzadeh Profile Picture
    13,585 Super User 2025 Season 1 on at
    RE: Electronic Reporting - Insert comment in Formula editor

    Hi petya,

    I think that you can apply the IF function for this requirement. If the text is related to a data in a specific table, you can use the binded to data model, you can use the binded element. For example, I have binded customer group on CustTable to model.'Collection interest journal'.Customer.CustGroup:

    IF(

    OR(model.'Collection interest journal'.Customer.CustGroup="11",

    model.'Collection interest journal'.Customer.CustGroup="12"),

    NOT(model.'Collection interest journal'.Customer.AccountNumber=""),

    model.'Collection interest journal'.Customer.VATNum<>"")

    In the following example, I have created a validation formula that if customer group is 11 or 12 customer account number should not be empty and IF not the tax exempt number should be provided.

    For more information about electronic reporting functions please check:

    docs.microsoft.com/.../er-functions-logical-if

    docs.microsoft.com/.../er-formula-language

  • petya.topalova Profile Picture
    28 on at
    RE: Electronic Reporting - Insert comment in Formula editor

    Thank you very much, Alireza,

    I want to comment the code, so that it is not taken into account.

    Like some of those used in other programing languages:

    <!-- text, code, etc. --> or

    // text, code, or

    /* text, code */, or

    the one used in excel: +N("text, code") .

    How can I do it in the Formula editor?

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,207 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans