0

"comments" in the code

How can I include comments in the code that is ignored by Ninox when executing the code?

Arjan G

7 replies

null
    • Leonid_Semik
    • 6 yrs ago
    • Reported - view

    let myComment:="this is a comment"

     

    Leo

    • Nick
    • 6 yrs ago
    • Reported - view

    "Define ID in variable";
    let myId := Id;
    "Get customer name";
    let myCust := Customer;

    Nick

    • Arjan_Groen
    • 6 yrs ago
    • Reported - view

    Thank you. It's more clear when you define some "comments" between the code 

    • activelifejss
    • 5 yrs ago
    • Reported - view

    Yes we need an easy comment function such as // instead of just assigning a meaningless variable as a workaround...

    • activelifejss
    • 5 yrs ago
    • Reported - view

    Apparently just the quotes are needed, the "let" and variable name is not needed. So, you can insert comments using this;

    "---INSERT COMMENT HERE---";

    • Tim
    • 5 yrs ago
    • Reported - view

    Just be aware that with a quoted string not assigned to anything, you are not really creating a comment, you are specifiying a result value that may or not be used somewhere. For example, in a formula field, if the last line in the script is a "comment" in the form of an unassigned quoted string, then that will be the result of the formula.

    It would also be interesting to know if there is a performance difference in assigning a quoted string to a variable or not assigning it. This would be especially interesting if the "comments" are in a loop with many iterations.

    • Mconneen
    • 5 yrs ago
    • Reported - view

    @Tim.. great observation ... I have used the  let c:= "my comment" ..     c:="new comment" ..  I have used them in loops... but never did any perf / load testing. 

Content aside

  • 5 yrs agoLast active
  • 7Replies
  • 2491Views