Title: Re: Witango-Talk: �'data' system variable
Wasn't there a change to the default scope between Tango2000 and Witango 5.  Maybe if you specify the scope i.e. @@local$reasons instead of @@reasons.  Just a thought.
-----Original Message-----
From: Dave Machin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 12, 2002 10:53 AM
To: Multiple recipients of list witango-talk
Subject: Re: Witango-Talk: 'data' system variable

The code is kind of complicated, but here's the gist of it:
 
I do a Direct DBMS query and the results html does the following:

<@assign scope=local name=data value=@@resultset>

The results is an array that looks like this (but is longer covering many dates):

Canned response 11/05/2002 00:00:00 1
Didnt Answer Question 11/05/2002 00:00:00 2
Other 11/05/2002 00:00:00 1

Then I do the following (what I'm doing is formatting the results of the DBMS to pass as an argument to a PopChart Java graph.):

<@assign scope=local name=dates value=<@distinct array=data cols=2>>

<@assign scope=local name=reasons value=<@distinct array=data cols=1>>

<@rows array=reasons>

<@assign name=current_reason_row scope=local value=<@currow>>

@@reasons[@@current_reason_row,1],

<@rows array=dates>

<@assign scope=local name=act_value value=<@filter array=data expr="#1=@@reasons[@@current_reason_row,1] AND #2=@@dates[<@currow>,2]">>

@@act_value[1,3],

</@rows>;

</@rows>

I expect the results to look like this:

   Canned response,
      1,
      ,
      ,
      1,
      1,
      ,
      ,
     ;
   Didnt Answer Question,
      2,
      1,
      1,
      2,
      ,
      ,
      ,
     ;
   Other,
      ,
      ,
      ,
      ,
      ,
      ,
      1,
     ;

But, I got the following:

,
,
,
,
,
,
,
,
;
,
,
,
,
,
,
,
,
;

(ie., no values, only the commas and semi-colons)  I changed 'data' to 'datta' throughout the code and it worked.  Of note is that the code as above works fine on a Tango 2000 server and only stopped working on the WiTango 5 server.

----- Original Message -----
From: Phil Wade
Sent: Monday, November 11, 2002 8:21 PM
Subject: Re: Witango-Talk: 'data' system variable

Dave,
No there is not a system variable @@data, and the following code works in our lab:

<@ASSIGN local$Data "This is the contents of the Data variable in local scope">
@@local$Data<br>
<@ASSIGN request$Data "This is the contents of the Data variable in request scope">
@@request$Data<br>
<@ASSIGN user$Data "This is the contents of the Data variable in user scope">
@@user$Data<br>
<@ASSIGN myscope$Data "This is the contents of the Data variable in myscope scope">
@@myscope$Data<br>
<@ASSIGN domain$Data "This is the contents of the Data variable in domain scope">
@@domain$Data<br>

This is the output:

This is the contents of the Data variable in local scope
This is the contents of the Data variable in request scope
This is the contents of the Data variable in user scope
This is the contents of the Data variable in myscope scope
This is the contents of the Data variable in domain scope

Can you post the code you are having problems with.

Phil


On 12/11/02 12:23 PM, "Dave Machin" <[EMAIL PROTECTED]> wrote:

> Is there a system variable called @@data in WiTango 5?  I have code that was
> working on the previous version, but everywhere I've referenced a local scope
> variable 'data' the code doesn't work.  When I renamed the variable it was
> OK...
>
> Dave Machin
>
>

Reply via email to