Page 1 of 1

Element Not Found "FY"

Posted: Wed May 08, 2013 7:05 pm
by tgaluskapatterson
I am in architect 10.1 writing a rule. I am trying to automate my cube so if I enter a value in the 'System_ProcessInfo' cube it will update all the current FY in my code that were previously hard coded. In other word one entry point to roll my months and years.

Old Code
['Current Budget','Period Input','Variance Budget Basis $']=['Current Budget','FY 2014','Amount (LC)']-['Budget Basis','FY 2014','Amount (LC)'];

New Code
['Current Budget','Period Input','Variance Budget Basis $']=['Current Budget','FY'|' '|'20'|DB('System_ProcessInfo', 'stringValue23', 'Patt_Admin'),'Amount (LC)']-['Budget Basis','FY 2014','Amount (LC)'];

The code works just fine if I enter 'FY 2014'. However if I attempt to automate using 'FY'|' '|'20'|DB('System_ProcessInfo', 'stringValue23', 'Patt_Admin') it will not work. I am using this same code for other rules in the same cube so it seems strange. For some reason it appears not to be recognizing the concatenation bar | .

The error i receive is below.

Error:
Error on line 82:
Element Not Found "FY"

Re: Element Not Found "FY"

Posted: Wed May 08, 2013 7:31 pm
by Duncan P
Element names within [ ] cannot be expressions, either on the left or the right of the =. You will have to use a DB( ... ) instead.

If you have used this exact technique in another place and it has worked then I would very much like to know the exact details, as it really shouldn't have worked.

Re: Element Not Found "FY"

Posted: Wed May 08, 2013 7:33 pm
by jim wood
Bloody hell Duncan you were quick. I barely got time to hit reply!!! :D

Re: Element Not Found "FY"

Posted: Wed May 08, 2013 7:36 pm
by jim wood
Also post moved. Enhancements is not meant to be a forum for coding questions. Please keep all coding questions with the main TM1 forum. Please refer to the request for assistance guidelines announcement.

Re: Element Not Found "FY"

Posted: Wed May 08, 2013 7:50 pm
by tgaluskapatterson
Appreciate the help. This worked great. It appears the other code i used was in a DB reference just didn't realize I couldn't use in a standard equals formula. Thanks!