Page 1 of 1

Variable becomes undefined

Posted: Thu Dec 04, 2014 9:05 am
by BariAbdul
I don't know it is just me or anybody else come across this,When I defined new variable in variables tab for example
V9='Customers'; and change to V9 to vCUSTOMER now it is vCUSTOMER='Customer'; when I click evaluate and ok the variable becomes undefined turn to old value V9='Customers'; Then I have to define it again to work as vCUSTOMER='Customer';

Why I need to define it twice?Is there something I am doing wrong here.Thanks :)

Re: Variable becomes undefined

Posted: Thu Dec 04, 2014 9:23 am
by declanr
The second you change the name it is considered an entirely different variable as far as TM1 is concerned.
Best case is you know up front what you want it to be called and don't change the name; since the formula actually contains the variable name this obviously needs to be rewritten - wouldn't be hard for IBM to automate this but also probably not high on their list of priorities.

Other options are to not use the custom defined variables in the variables tab at all and just set in yourself in the prolog if it's not data source dependent (as with your example this would be preferable as it doesn't have to evaluate it for every record) or in the data/metadata tabs if its is source data dependent.

Re: Variable becomes undefined

Posted: Thu Dec 04, 2014 1:12 pm
by BariAbdul
Thanks declanr,I was just interested to know the reason behind this peculiar behavior.Appreciate it.