web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Verified answer
    Alireza Eshaghzadeh Profile Picture
    14,672 Super User 2025 Season 2 on at

    Hi petya,

    You can add text/comment formula editor as follows:

    "Text"

    for example following element is binded with fixed text:

    pastedimage1653837941110v2.png

    pastedimage1653837964459v3.png

  • petya.topalova Profile Picture
    28 on at

    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?

  • Verified answer
    Alireza Eshaghzadeh Profile Picture
    14,672 Super User 2025 Season 2 on at

    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

    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.

  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    14,672 Super User 2025 Season 2 on at

    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

    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
    14,672 Super User 2025 Season 2 on at

    Hi Petya,

    It is possible.

    You can share the formula if you need assistance.

  • petya.topalova Profile Picture
    28 on at

    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

  • Verified answer
    Alireza Eshaghzadeh Profile Picture
    14,672 Super User 2025 Season 2 on at

    You can test following formular:

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

    "Comment",

    model.'Company info'.Name)

  • Klara Calabro Profile Picture
    18 on at
    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. 

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans