Parse formula

Hi, all:
I am developing a salary system by using J2EE. As we know, the salary and allowance systems of various company have great differently. So I create a table to store formula. Also, I also create a salary item table to maintain salary items. When I calculate salary, I need to parse salary formula. Who has algorithms? I want a algorithm which can parse +, - *, /, ().
For example: one of salary items is:
f9 = (f10-2000)*0.8;
f1 = f2 + f3 - f4;
f1, f2, f3, ...., f9, f10 represent salary and allowance items.
Any help would be useful.
Thanks!

Here is the code, there are other classes refered to in this one, but you should be able to figure out what they are based on the name. If you have any questions let me know
import java.util.StringTokenizer;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
  *@author Steven Bell
  *@version 1.0 3/5/03
  *the ExpressionTree class is used to evaluate and hold a mathmatical expression
public class ExpressionTree{
     SimpleStack numberstack, opstack, cellrefs;
     String originalexpression;
     Token root;
     Graph graph;
       *creates an Expression tree
       *@param expression the expression to be evaluated
       *@param graph a reference to the Graph where cells are stored
       *@throws MalformedCellException thrown if the expression is invalid
     ExpressionTree(String expression, Graph graph)throws MalformedCellException{
          originalexpression      = expression;
          this.graph              = graph;
          StringTokenizer extoken = new StringTokenizer(expression, OperatorToken.OPERATORS, true);
          String[] tokens         = new String[extoken.countTokens()];
          for(int i=0;i<tokens.length;i++){
               tokens=extoken.nextToken();
          buildTree(tokens);
     //creates the tree from the array of tokens each token is a portion of the expression
     private void buildTree(String[] tokens)throws MalformedCellException{
          boolean checkunaryminus = true;
          boolean unaryminus = false;
          numberstack = new SimpleStack(13);
          opstack = new SimpleStack(13);
          cellrefs = new SimpleStack(13);
          for(int i=0;i<tokens.length;i++){
               if(LiteralToken.isLiteral(tokens[i])){
                    if(unaryminus){
                         numberstack.push(new LiteralToken(-1*Double.parseDouble(tokens[i])));
                         opstack.pop();
                         unaryminus = false;
                    }else{
                         numberstack.push(new LiteralToken(Double.parseDouble(tokens[i])));
                    checkunaryminus = false;
               }else if(CellToken.isCell(tokens[i])){
                    Cell tempcell = getCell(tokens[i]);
                    cellrefs.push(tempcell);
                    Token temp = new CellToken(tempcell);
                    if(unaryminus){
                         temp = buildSubTree(new LiteralToken(0), (OperatorToken)opstack.pop(), temp);
                         unaryminus = false;
                    numberstack.push(temp);
                    checkunaryminus = false;
               }else if(OperatorToken.isOperator(tokens[i])){
                    if(unaryminus) throw new MalformedCellException("illegal expression operator after minus");
                    char op = tokens[i].charAt(0);
                    if(checkunaryminus){
                         if(op=='-'){
                              opstack.push(new OperatorToken(op));
                              checkunaryminus = false;
                              unaryminus = true;
                         }else{
                              opstack.push(new OperatorToken(op));
                    }else{
                         if(op=='('){
                              opstack.push(new OperatorToken(op));
                         }else if(op==')'){
                              OperatorToken temp = (OperatorToken)opstack.pop();
                              while(temp.instancePriority() != OperatorToken.getPriority('(')){
                                   if(numberstack.numObjects()<2){
                                        throw new MalformedCellException("Incefficient Numbers");
                                   Token r = (Token)numberstack.pop();
                                   Token l = (Token)numberstack.pop();
                                   numberstack.push(buildSubTree(l, temp, r));
                                   temp = (OperatorToken)opstack.pop();
                         }else{
                              if(!opstack.isEmpty()){
                                   OperatorToken ot = (OperatorToken)opstack.peek();
                                   if(OperatorToken.getPriority(op)<ot.instancePriority()){
                                        if(numberstack.numObjects()<2){
                                             throw new MalformedCellException("Incefficient Numbers");
                                        Token r = (Token)numberstack.pop();
                                        Token l = (Token)numberstack.pop();
                                        numberstack.push(buildSubTree(l, (OperatorToken)opstack.pop(), r));
                              opstack.push(new OperatorToken(op));
                         checkunaryminus = true;
               }else{
                    throw new MalformedCellException("illegal expression Failed all tests");
          while(!opstack.isEmpty()){
               if(numberstack.numObjects()<2){
                    throw new MalformedCellException("Incefficient Numbers");
               Token r = (Token)numberstack.pop();
               Token l = (Token)numberstack.pop();
               numberstack.push(buildSubTree(l, (OperatorToken)opstack.pop(), r));
          root = (Token)numberstack.peek();
     *gets the value of this expression
     *@return String returns the value of this expression in a String
     public String getValue(){
          double temp = root.getValue();
          return String.valueOf(temp);
     *gets the original expression that was parsed
     *@return String the original expression
     public String getEquation(){
          return originalexpression;
     *get the cells that are reference in this expression
     *@return Cell[] array of cells this expression holds
     public Cell[] getReferences(){
          Cell[] returncells = new Cell[cellrefs.numObjects()];
          int index = 0;
          while(!cellrefs.isEmpty()){
               returncells[index++]=(Cell)cellrefs.pop();
          return returncells;
     //builds one three node subtree
     private Token buildSubTree(Token l, OperatorToken ot, Token r){
          ot.setLeftChild(l);
          ot.setRightChild(r);
          return ot;
     //uses buildSubTree to create a tree until more of the expression needs to be parsed
     private Token buildSubTrees(char op)throws MalformedCellException{
          if(op==')'){
               OperatorToken ot = (OperatorToken)opstack.peek();
               while(ot.instancePriority()!=0){
                    if(numberstack.numObjects()<2){
                         throw new MalformedCellException("Incefficient Numbers");
                    Token r = (Token)numberstack.pop();
                    Token l = (Token)numberstack.pop();
                    numberstack.push(buildSubTree(l, (OperatorToken)opstack.pop(), r));
          }else{
               OperatorToken ot = (OperatorToken)opstack.peek();
               while(OperatorToken.getPriority(op)<ot.instancePriority()){
                    if(numberstack.numObjects()<2){
                         throw new MalformedCellException("Incefficient Numbers");
                    Token r = (Token)numberstack.pop();
                    Token l = (Token)numberstack.pop();
                    numberstack.push(buildSubTree(l, (OperatorToken)opstack.pop(), r));
          return (Token)numberstack.peek();
     //gets or creates cell that is referenced in expression
     private Cell getCell(String cellname)throws MalformedCellException{
          int row = 0;
          int col = 0;
          Pattern colpatt = Pattern.compile("[a-zA-Z]+");
          Pattern rowpatt = Pattern.compile("\\d+");
          Matcher m = colpatt.matcher(cellname);
          m.find();
          String columnstring = m.group().toUpperCase();
          m = rowpatt.matcher(cellname);
          m.find();
          String rowstring = m.group();
          row = Integer.parseInt(rowstring);
          row--;
          char[] colchar = columnstring.toCharArray();
          for(int j=colchar.length-1;j>=0;j--){
               col+=colchar[j]-'A'*Math.pow(26, j);
          if(row<0||col<0){
               throw new MalformedCellException("illegal expression");
          Vertex v = graph.doesCellExist(col, row);
          if(v!=null){
               return v.getCell();
          return new Cell(col, row, "0", graph);

Similar Messages

  • "Eval Parsed Formula Node VI" does not return outputs in predefined order

    I make a data analysis program, where the data consists of some million events and each event has e.g. 4 channels and 1-5 hits on each channel. 
    I would like the user to select different expressions of these channels to give coordinates to plot in a 2D histogram (increment a bin in Intensity Graph), e.g. for some experiment you want to show x=ch1-ch2; y=ch1+ch2+ch3+ch4; while in another experiment you want x=ch1-123; y=123-ch2;
    There are other VIs that use static LabView-code for the normal things, but now after a few years of adding to this program I find that it would be quite good with a general plotter and let the user specify simple expressions like this. Also with the "normal" static plots, there is a need to filter out bad data and then it would be much simpler both to program and use if you could write text expressions with boolean logic to combine multiple filters. Making a LabView code and GUI that allows AND/OR/parenthesis combinations of expressions will be quite an effort and not very reusable.
    So, with the above motivation, I hope you see that it would make sense to have a useable string formula evaluator in LabView. I find some info about MathScript's user-defineable functions, but haven't managed to get MathScript working in LV2010 yet (maybe some licensing or installation issues, I think I had it in 8.6). But I think it would be possible to do most of what I want for the display-part (not the filtering) with the simpler Eval/Parse Formula Node VIs and suitable use of the limited variable name space. So I started testing, and found a quite annoying issue with how the evaulator works.
    To the parser, you are expected to send an array of output variable names. But then it ignores this array, and returns one output per assignment/semicolon in the formula, in the order of the formula text. Since the static parts of my program need to know what the output values mean (which of them is x and which is y), I would have to rely on the user not using any intermediate variable and defining x before y. The attached screenshot demonstrates the problem, and also that it has been solved by NI statff in the "Eval Formula Node VI" which does the appropriate array-searching to extract only the pre-defined outputs, in their expected order. But using that VI is about 100 times as slow, I need to pre-compile the formula and then only use the evaulator in the loop that runs over a million events.
    I don't know if I'll take the time to make my own tweks to the parsing stage (e.g. preparation of array-mapping to not have to repeat the search or maybe hacking the output list generated by the parser) or if I'll have to make it in a static Formula Node in the block-diagram (which supports more functions), so that the user has to run with development environment and stop the program to change the plotting function. But I wanted to share this trouble with you, in hope of improvments in future LabView versions or ideas from other people on how I could accomplish my aim. I have MATLAB-formula node possibility too, but is far as I have seen the only place the user could update the formula would then be in a separate .m file, which is re-read only when typing "clear functions" in the Matlab console window. (Having this window is also an annoyance, and perhaps the performance of calling Matlab in every iteration is not great.) 
    Besides this issue, it also seems very strange there is virtually no support for conditional expressions or operators in Formula Node evaulated formulas (called Mathematics VIs in the documentation). Maybe using (1+sign(a-b))/2 you can build something that is 0 when a<b and 1 when a>b, but it is not user friendly! Would it really be diffcult to add a function like iif(condition, return_value_if_true, return_value_if_false) to replace the unsupported "condition ? if_true : if_false" operator? Would it really be difficult to add support for the < <= >= > == || && operators? Although compiled to an assemply language, this can't exactly be difficult for a CPU.
    Attachments:
    LV script test.png ‏62 KB
    LV script test.vi ‏18 KB

    (1) You can put any kind of code inside an event structure with the limitation that it should be able to complete quickly and without user interaction.  For example a while loop for a newton-raphson method is fine, but an interactive while loop where the stop condition depends on user iteraction is not recommended. By default, event structures lock the front panel until the event completes, so you would not even be able to stop it.
    (2) Yes, you can do all that. LabVIEW has no limitation as a programming language. Use shift registers to hold data and state information, the manipulate the contents as needed.
    (3) I would recommend to use plain LabVIEW primitives instead of formula nodes. Show us your code so we can better see what it's all about. Obviously you have a mismatch betweeen scalars and arrays. It is impossible from the given information where the problem is.
    (4) Yes, look inside the nonlinear curve fit VI (you can open it an inspect the code!). One of the subVIs does exactly that. Just supply your model VI.
    LabVIEW Champion . Do more with less code and in less time .

  • Formula at run time

    Hi everyone
    I need to create a piece of code that takes a number of channels and creates
    a new channel making use of a formula, this is no problem if you want to
    hard code the formula, but it seems almost impossible if you want to change
    the formula at run time.
    Any suggestions?
    Thanks
    Jannie

    There are VIs that come with LabVIEW (probably full / pro only) that let you do this, provided I understand what you're asking.
    I suggest searching the palettes for "Eval Formula String.vi".  This is the "easy" way to do it, but it will parse your formula string every time it is called.  This parsing can be rather time consuming.  If you want to do the parsing first, and then run the calculation multiple times, you can split up the parsing and evaluation by using "Parse Formula String.vi" first, then use the outputs from it to a call to "Eval Parsed Formula String.vi" inside a loop.

  • Formula node related VIs

    I am looking for the following VIs for LabVIEW 7.0, does anyone have these files?  Thanks.
    Eval Formula node.vi
    Parse Formula Node.vi
    Eval Parsed Formula Node.vi

    They should be in the "Analyze..Math..Formula" palette.
    If they are not there, it could mean that you only have LabVIEW base. In this case you would need to upgrade to LabVIEW full or higher.
    LabVIEW Champion . Do more with less code and in less time .

  • How can I specify simple math like in a Formula Node but on the front panel?

    If the Formula node had a "text" property, that would work for me, because I could limit my inputs and outputs to N floating-point numbers.
    LabVIEW once had such a thing but it was in an add-on math library, and I don't remember what it was called.
    Solved!
    Go to Solution.

    Thanks; that led me directly to what I was looking for. A combination of "Parse Formula String.vi" and "Eval Parsed Formula String.vi" works perfectly for me!

  • Formula  ASo to BSO

    Hi All
    I have one formula in ASO so how can i excute this in BSo , i have to change it According to BSo i modified something but its giving syntax errror , plz can any one help how can i write this formula in BSo
    case
    when
    is ([PERIOD].CurrentMember,[2009.01]) and is ([INDICATOR].CurrentMember,[DI-3])
    Then (Sum (CrossJoin({[FLOW].[MtD]},{[PERIOD].[2009.01] })))
    Thanks

    Actually my formula is for every mont calculating sum like below in ASo
    case
    when
    is ([PERIOD].CurrentMember,[2009.01]) and is ([INDICATOR].CurrentMember,[DI-3])
    Then (Sum (CrossJoin({[FLOW].[MtD]},{[PERIOD].[2009.01] })))
    when
    is ([PERIOD].CurrentMember,[2009.02]) and is ([INDICATOR].CurrentMember,[DI-3])
    Then (Sum (CrossJoin({[FLOW].[MtD]},{[PERIOD].[2009.01] , [PERIOD].[2009.02]})))
    Else
    ytd_ld
    end
    I tried this wat u gave me but its giving error
    Error(1200347) - Error parsing formula for [YtD] (line 6): expected [(] found [@MEMBER] after function name
    IF(@ISMBR("2009.01") and @ISMBR("DI-3"))
    "MTD";
    ELSE if
    "YtD_l"
    end;
    but for cross joinn of mtd and particuler months we have to use @Sumrange ,

  • JExcel Formula

    Hi there,
    This is my first time posting a question, but I've been programming in Java for a while now..
    I am having trouble with Formula class in JExcel..
    Formula f = new Formula (col, row, "=COUNTA(E6:E99)");
    sheet.addCell(f);
    then when i run my program... i get a warning.. and not an exception
    Warning:  Unrecognized function when parsing formula =counta(E6:E99) in cell Grade 11!E2
    I dont know what else to do... because that's the only thing that the api shows...
    Can anyone help me with this?...
    Thanks in advance!

    G,
    You have found the discussion area for the Mac version of iWork. The iOS discussion is here:
    https://discussions.apple.com/message/17323871#17323871
    I'll bet that someone in that iOS discussion area can help you.
    Jerry

  • フォーミュラノード解析(Eval Formula Node.vi)について

    LabVEW2013
    Eval Formula Node.viに式を与えて計算させようとすると「エラーコード-23087が不明位置で発生」しました。
    同じ式をフォーミュラノードに与えると正常に計算し結果が出ました。
    2日ほど試行錯誤して、変数名に大文字が含まれるとParse Formula String.viが構文解析に失敗することがわかりました。
    mu=T1+P1;
    はエラーになりますが、
    mu=t1+p1;
    はエラーになりません。
    大文字が含まれる変数名も受け入れる様に改良されることを望みます。
    解決済!
    解決策の投稿を見る。

    これは仕様なのでしかたがないと思います。
    http://zone.ni.com/reference/ja-XX/help/371361J-0112/gmath/variables/
    http://zone.ni.com/reference/en-XX/help/371361K-01/gmath/variables/
    フォーミュラ解析VIで使用できるのは、以下の変数のみです。
    メモ  これらの変数は、「非線形カーブフィット」VIのフォーミュラ文字列の説明の指定にも使用されます。
    a, a0, ..., a9
    b, b0, ..., b9
    z, z0, ..., z9
    変数名と関数名には小文字だけを使用できます。大文字はエラーとして解釈されます。
    指数表記法のすべての数値では、1E-1の規約(大文字のE)を使用します。1e–1 を使用すると、エラーメッセージが表示されます。
    下記の製品および機能の提案で投稿すると実際にLabVIEWを開発しているエンジニアが意見を見てくれますよ。
    http://forums.ni.com/t5/LabVIEW-Idea-Exchange/idb-p/labviewideas

  • Parsing forumale error

    Hi,
    I am getting error when I am trying to write a formuale across a sparse dim member Y(Level 1).
    Here is what I'm doing,
    Measures (Accounts)
    x(Level 0)
    Market
    Y(Level 1) Her is the formulae IF("X"=0)
    "Y"=@SUM(@LEVMBRS("Market",0))
    ENDIF
    rror(1200336) - Error parsing formula for [Y] (line 1): [(] without [)]eE
    Please let us know is there any error in this formuale

    Hi,
    In the "if ..endif ", the syntax is
    IF( condition )
    statement ;
    ENDIF;
    something like this
    IF("X"=0)
    "Y"=@SUM(@LEVMBRS("Market",0);
    ENDIF;
    I dont see semi colons.Try it out this way.
    Sandeep Reddy Enti
    HCC
    http://hyperionconsultancy.com/

  • BR Synthax error : Multiple executions at the same time

    Hi,
    we are currently doing stress tests on our system and one of the tests is to launch 6 times the same rule on 6 different workstations simultaneously.
    We got a drop in performance as expected but we also got some error like this one below:
    [Wed Sep 30 14:03:01 2009]Local/SBQ/Wrkforce/essadmin/Error(1200315)
    Error parsing formula for [FIX STATEMENT] (line 17): invalid object type
    [Wed Sep 30 14:03:01 2009]Local/SBQ/Wrkforce/essadmin/Error(1012001)
    Invalid Calc Script syntax [
    FIX("S0000","STOUS","A0000","ATOUS","P0000.0000","PTOUS","E23.1023","E23","I00","ITS")
    @MATCH("CR_Planif_Strat","CR*");
    ENDFIX]
    [Wed Sep 30 14:03:01 2009]Local/SBQ/Wrkforce/essadmin/Error(1200421)
    Error encountered on or after line [18]
    The problem here is that the same business rule runs for 5 users without problems and 1 user with a syntax error. The user who gets the error can later run the same business rule without errors.
    Did anyone ever experience something like that?
    We are using System 9.3.1.0.
    Thanks

    Hi,
    forget this issue. The users ran the wrong business rules (they took the "Wrkforce" version of the rule instead of the "Finance" one).
    We just saw it the log:
    Wed Sep 30 14:03:01 2009Local/SBQ/ Wrkforce /essadmin/Error(1200315)
    Thanks

  • How to find out which BR that is the problem when running CmdLnLauncher.bat

    Hi there
    Trying to run a sequence using CmdLnLauncer, and it starts great. It starte calculating but then throws this error.
    "2012-09-04 15:21:24,790 FATAL main com.hyperion.hbr.cmdlnlauncher.ProgressMonito
    r - Exception:
    Execution ended with error.
    Error Code: EXE002
    Error Args: [Ljava.lang.Object;@2f0d54
    ClassName: com.hyperion.hbr.excp.ExecutionException
    Exception (1200497): Error parsing formula for [FIX STATEMENT] (line 16): unknow
    n member name [@_NULL] in function [@IDESCENDANTS]
    ClassName: java.lang.Exception
    2012-09-04 15:21:24,790 WARN main com.hyperion.hbr.cmdlnlauncher.ProgressMonitor
    - Execution ended with error."
    How do I figure out which BR is the problem? I can't seem to find the rule it is refering to, as the

    Have a search for hbrlaunch.log as it might hold the answer, location can depend on version and OS
    or another option to enable business rule auditing in Planning and then check the HSP_AUDIT_RECORDS table
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • An error ocurred while running the specified calc script. Check the log...

    Hi,
    I get the following error when I use the "Mass Mllocate" of hyperion planning (11.1.1.3) , specifically when i try to use "Spread Type" and select "Relational Spread".
    I check the log for details, i see the following messages:
    [Mon Mar  5 17:34:18 2012]Local/TCM/VtaCto/admin/Info(1013162)
    Received Command [Calculate] from user [admin]
    [Mon Mar  5 17:34:18 2012]Local/TCM/VtaCto/admin/Info(1200481)
    Formula for member [FY11] will be executed in [CELL] mode
    [Mon Mar  5 17:34:18 2012]Local/TCM/VtaCto/admin/Error(1200315)
    Error parsing formula for [FIX STATEMENT] (line 24): invalid object type
    [Mon Mar  5 17:34:18 2012]Local/TCM/VtaCto/admin/Error(1012001)
    Invalid Calc Script syntax [
    FIX ("Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic","42300007","CC_054","CIA_063","PPTO","TRABAJO","S_241","S_251","S_252","S_253","S_254","S_255","S_259","S_260","S_227","S_228","S_229","S_230","S_231","S_232","S_233","S_234...]
    [Mon Mar  5 17:34:18 2012]Local/TCM/VtaCto/admin/Error(1200421)
    Error encountered on or after line [25]
    [Mon Mar  5 17:34:18 2012]Local/TCM/VtaCto/admin/Info(1020055)
    Spreadsheet Extractor Elapsed Time : [0] seconds
    [Mon Mar  5 17:34:18 2012]Local/TCM/VtaCto/admin/Info(1020082)
    Spreadsheet Extractor Big Block Allocs -- Dyn.Calc.Cache : [0] non-Dyn.Calc.Cache : [0]
    But i can not identify which calculation is referenced and that I understand is what is failing.
    Could guide me about that would have to check to find what is generating the error.
    Thanks in advance!!!

    Hi,
    One problem is that I can not identify the script because it was not created by me, as I understand this calc is implicit in planning, only runs when you select the option "mass allocate".
    The published extract was obtained from the log of the application in which the calculation is running, this was extracted from essbase directory that hosts the application.
    Hector Ortega

  • Error while creating Custom Defined Functions in Essbase

    <p>Hi All,<br>I am trying to create CDF(Custom Defined Functions) in Essbase. Iwant to create a function which take list of child member andreturn the first child. For this, i have created a java file called"ChildAccess.java" which contains the following code:<br>public class ChildAccess<br>{<br>public static char GetFirstMember(char [] members)<br>{<br>return members[0];<br>}<br>}<br>I have compiled and made jar file called"ChildAccess.jar" and pasted it at"ARBORPATH/java/udf". Then i restarted the Essbase Serverand run the following MaxL command to register the function<br>create or replace function '@ChildAccess' as<br>'ChildAccess.GetFirstMember'<br>spec '@ChildAccess(memberRange)'<br>comment 'adds list of input members'.<br>Till here i am not getting any error but when i am using thisfunction in my calc script as given below<br><br>FIX(@ChildAccess(@CHILDREN("Abc")))<br><br>it gives the following error<br>"Error:1200414 Error parsing formula for [FIX STATEMENT]<br>(line 2)"argument[1] may not have size[6] in function[@CHILDREN]"<br>NOTE: The SIZE[6] is giving the no. of child in member"ABC".<br><br>Thanks in Advance<br>Arpit</p>

    If you want to use the CDF in a FIX statement you need to make sure that it returns a member name rather than a number:<BR><i><BR>public class ChildAccess<BR>{<BR>    public static String GetFirstMember(String[] members)<BR>    {<BR>        return members[0];<BR>    }<BR>}<BR></i><BR>I prefer to define the function against a specific application rather than globally because you only need to restart the application in order to pick-up any modifications to the .jar file. So the MaxL function definition would be:<BR><i><BR>    create or replace function appname.'@_GETFIRSTMEMBER' as<BR>        'ChildAccess.GetFirstMember(String[])';<BR></i><BR>and in the calculation script the FIX statement would become:<BR><i><BR>    fix ( @member( @_GetFirstMember( @name( @children( "Abc" ) ) ) ) )<BR></i><BR>This looks a little messy so you can use a macro to simplify it:<BR><i><BR>    create or replace macro appname.'@GETFIRSTMEMBER'(single) <BR>        as '@member( @_GETFIRSTMEMBER( @name( @@1 ) ) )' <BR>        SPEC "@GETFIRSTMEMBER(memberRange)";<BR></i><BR>and then the FIX statement could be written:<BR><i><BR>    fix( @getfirstmember( @children( "PRODUCT" ) ) )<BR></i>

  • Sequence will not validate with run time prompts in business rules

    I am in Hyperion Planning v 1.1.1.3, with Workforce initialized. I am creating a sequence of business rules. The rules use run time prompts within them and validate when used on their own. However, when I insert them in a sequence the sequence will not validate, apparently due to the run time prompts.
    The sequence returns the error: Cannot calculate. Essbase Error(1200323): Error parsing formula for [FIX STATEMENT] (line 7): expression expected after [(].
    Line 7 in the business rule is as follows:
    FIX ([rtpYear],[rtpScenario],[rtpVer],[rtpCC],[rtpBU],[rtpEmp])
    The problem is not isolated to this business rule, it occurs with any rule I try.
    Can sequences function with run time prompts in the included business rules?
    Stephen

    I have figured out that if any rtp is hidden in the business rule, the sequence will not validate. Is this expected behavior for sequences?
    Additionally, hiding the variables in the sequence has no effect if the variables are not hidden in the rule. When launched from a menu in a web form, the user is prompted for values for all variables (except for the Execution Database Name) although they are prepopulated based on the members in the POV, Page, etc. Is this also expected behavior?
    I also find that it won't validate if "Merge launch variables" is selected (I have included rules associated with different plan types and with different dimensionality, so this may be expected). The user is prompted to provide values for every variable in each rule in the sequence, many of them duplicates (though, again, they are prepopulated based on members in the form).
    Stephen

  • Unable to execute the substitution variable in calc scripts in essbase 11.1

    Unable to execute the substitution variable in calc scripts in essbase 11.1.3
    FIX(&CURRVERSION,COLA)
    Unit=units*Listprice;
    dataexport "file" "," "E:\NEW.TXT";
    ENDFIX
    Error: 1200471 Error parsing formula for FIX STATEMENT (line 1): expression expected before [)]
    This is error it throws when executing the calculation script
    I wonder whether its a problem with substitution variable i want to know wat went wrong inside the fix statement
    I have created substitution variable use maxl
    Installed the essbase in custom manner and standlone mode nt register with the shared services ,
    Is this problem with the custom installation of essbase
    Regards
    shenna

    If you remove the substitution variable and replace it with the actual value (whatever that is), does the code work? That will tell you if the issue is around the substitution variable or not.
    John -- First you race Glenn, then you race me -- and you always win. :)
    Regards,
    Cameron Lackpour

Maybe you are looking for