Hello Servoy Team
For a still unknown reason (to me), we can’t enter an underscore (_) for a (stored) calculation since Servoy 4. As this is a naming convention we use, we would like if you could allow the underscore again. As a workaround, we can enter the underscore in the _calculations.js file. The drawback is that it’s unnecessary complicate and needs every time some additional mouse clicks (which is annoying).
I also checked about the validity of using underscores in JavaScript in the book: “JavaScript, The Definitive Guide”, from DAvid Flanagan (O’Reilly). There it says in chapter Identifiers, that underscore is a valid (legal) first character for variables and functions. So I don’t see any reason why we can’t enter it for calcs. Please allow this again in a future version of Servoy.
Best regards, Robert
The reason you can’t is that it is not a valid, legal character for column names in all backend DBs, and Servoy is trying to stop you from creating a problem if you are storing the calc.
Servoy could not know what backend you are using reliably or permanently, so it’s trying to keep your code safe for all possibilities.
g.
Hi Greg
But then they could just display it in orange as they do with too long column names, which, by the way we decided to not care, as it’s such a severe restriction nowadays, like Oracle’s 30 char limit (one never has the cahnce to design a halfway eadable data model then!)
So may I propose to put it orange, would also be consistent with as mentioned above too long column names.
Best regards, Robert
PS: By the way, do you know which database(s) has/have the underscore restriction?
agiletortoise:
The reason you can’t is that it is not a valid, legal character for column names in all backend DBs, and Servoy is trying to stop you from creating a problem if you are storing the calc.
Servoy could not know what backend you are using reliably or permanently, so it’s trying to keep your code safe for all possibilities.
g.