"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
-
let myComment:="this is a comment"
Leo
-
"Define ID in variable";
let myId := Id;
"Get customer name";
let myCust := Customer;
Nick
-
Thank you. It's more clear when you define some "comments" between the code
-
Yes we need an easy comment function such as // instead of just assigning a meaningless variable as a workaround...
-
Apparently just the quotes are needed, the "let" and variable name is not needed. So, you can insert comments using this;
"---INSERT COMMENT HERE---";
-
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.
-
@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
- 2492Views