cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Logic syntax error when using %variables%

Former Member
0 Likes
766

Hi all,

I'm facing a strange behavior on my script logic.

Like the code below shows, I intend to calculate a value multiplying a measure by another.

 

*WHEN INDIC

  *IS IND0006

      *BEGIN

        *REC(INDIC="IND0048",EXPRESSION=%VALUE% * ( [INDIC].[IND0004],[TIME].[%TIME_SET%] ) )

      *END

*ENDWHEN

*COMMIT

As the indicator IND0004 has value just in January, I'm using a dynamic variable to get total of the year (2012.TOTAL for example).

This way the admin is triggering the folowing message: "LINE 0 syntax error: "missing ) in parenthetical"

Then I replaced the %TIME_SET% by a hard code value, as below:

  *WHEN INDIC

  *IS IND0006

      *BEGIN

        *REC(INDIC="IND0048",EXPRESSION=%VALUE% * ( [INDIC].[IND0004],[TIME].[2012.TOTAL] ) )

      *END

*ENDWHEN

*COMMIT

And the error does not recur.

A strange thing too, is that in UJKT the code is validated in both ways.

Any help is welcome.

Thank you in advance.

Regards

Lucas Costa

View Entire Topic
Former Member
0 Likes

Hi Lucas,

yes the issue was an instruction different from EXPRESSION or FACTOR after the REC statement.

I'm sorry but I've problem with the image, they open only as blank form, thats why I just see your last post where the statement was just copied as text. So if you hope in another help by me, you must copy all the text inside the message,

but help maybe comes tomorrow, now I must escape .

Kind regards

     Roberto

Former Member
0 Likes

No problem Roberto,

I'll not work in that anymore, if is working...for me it's ok.

Thanks for your help! Have a nice one!

Regards,

Lucas Costa