Hello, I am facing really tricky situation.
I have enabled enhanced Rules editor.
1) A Rule was working fine.
2) I cut all the code from this rule file and pasted in a notepad file.
3) pasted back all the code back in the rule file
Now while saving or checking Syntax it throws error on Commented lines
"missing left square brackets"
I even double commented the already commented lines but no luck.
If i delete the commented lines then the error comes up for next commented block.
I tried multiple combinations of rebooting the server and copying rule files. But issue persists.
Any idea whats going on here. have any one experienced this before. (TM1 10.2.2- client Windows 10, Server AIX)
Thanks,
Rtel
Rule shows syntax error on Commented line !
-
- MVP
- Posts: 3105
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.0.9.18
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Rule shows syntax error on Commented line !
You can paste the offending rules here, maybe someone can spot something strange.
What happens if you delete again all rules (even rules that were commented out) and you add them again 1 by 1 (or 1 block at a time), not more ?
In the end, you should just not use the Advanced rules editor. Instead, use PAW, use Notepad++ or other text editors with syntax highlighting, but stay away from the abominations which are called Advanced rules editor and Performance Modeler.
What happens if you delete again all rules (even rules that were commented out) and you add them again 1 by 1 (or 1 block at a time), not more ?
In the end, you should just not use the Advanced rules editor. Instead, use PAW, use Notepad++ or other text editors with syntax highlighting, but stay away from the abominations which are called Advanced rules editor and Performance Modeler.
Best regards,
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Community Contributor
- Posts: 286
- Joined: Fri Feb 15, 2013 5:49 pm
- OLAP Product: TM1
- Version: PA 2.0.9.1
- Excel Version: 365
- Location: Minneapolis, USA
Re: Rule shows syntax error on Commented line !
This was a long time ago, but a coworker was getting a similar error on commented lines in advanced rule editor where they had a tab or a few spaces before the "#" character for the commented line. Removing the space/tab seemed to fix the error. I just tried to replicate the issue as I remembered it using basic rule editor but was unable to. Like I said, it was a long time ago; I may not be remembering the details correctly.
-
- MVP
- Posts: 3651
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: Rule shows syntax error on Commented line !
How long are the comments?
TM1 rules only have a first character of line # comment indication, like -- in SQL. Unlike most other languages there’s no /* start comment, end comment */ for wrapping comments over multiple lines or line feeds.
When the rule is saved the compiler is going to decide itself where to wrap the lines and if the # character is missing from subsequent lines then you are going to get this error. I can’t remember where it wraps (or rather cuts) but I think it’s either 128 or 256 characters.
So to avoid just LF long comments yourself and start each line with #
TM1 rules only have a first character of line # comment indication, like -- in SQL. Unlike most other languages there’s no /* start comment, end comment */ for wrapping comments over multiple lines or line feeds.
When the rule is saved the compiler is going to decide itself where to wrap the lines and if the # character is missing from subsequent lines then you are going to get this error. I can’t remember where it wraps (or rather cuts) but I think it’s either 128 or 256 characters.
So to avoid just LF long comments yourself and start each line with #
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
-
- Posts: 59
- Joined: Tue Nov 13, 2018 10:15 pm
- OLAP Product: TM1
- Version: 10.2
- Excel Version: 2013
Re: Rule shows syntax error on Commented line !
Thanks everyone for your suggestions.
I removed few blocks of large comments even though they were commented on each lines !! This seems to have solve the issue.
I will recreate the Rule just to see if I can replicate the error again with some large comments.
Thanks
Rtel
I removed few blocks of large comments even though they were commented on each lines !! This seems to have solve the issue.
I will recreate the Rule just to see if I can replicate the error again with some large comments.
Thanks
Rtel