Multiple characteristic variables in FOX

Question: I have created a variable in my planning area which contains values for two characteristics (company and fiscal period).
Is there any way I can read these values from a FOX formula?
If I use the VARV() or VARI() functions I get the following error message:
Only variables with a characteristic are allowed to be used here
Thanks for your help.

Answer:
Hi Guille,

I would recommend that you use 2 separate variables, 1 for Company and another for fiscal period. In this case you can read the value in FOX as

Data vcompany type 0comp_code.
Data vfiscper type 0fiscper.

vcompany = varv('variable company').
vfiscper = varv('variable fiscper').

Answer:
Thanks for your advice, but I did not explain to you all the "complexity" of the problem:

In this variable I am storing several values of company and period, and they are corresponding values (that means one fiscal period per company).
That's why I wanted to do a loop using the VARI function, so that in every step of the loop I could get the company and its corresponding period.

I am just thinking that maybe I can force the sequence of values in a variable, so that I can create two variables, one with multiple values of company and one with multiple values of period, and make sure that the first period in the second one corresponds to the first company in the first one, and so on.

I'll keep you posted.

Answer:
Hi Guille,

Could you in variable(s) by user exit, define and set the value of 2 other variables that are single characteristics? I.e. one for Company and one for Fisc period to be determined by the value of the Company Fiscal Year period?

Just a though as a workaround since I had only used multi-characteristics variable for related compound characteristics and as far as I know, there are not any FOX functions that would read the value of multiple charactersitics and VARV() only reads the value of a single characteristic...

Mary
Copyright ?2007 - 2008 www.jt77.com