Title: Re: Witango-Talk: �'data' system variable
Changing the defaultscope from "request" to "local"  should change nothing.  "local" is just an alias or synonym for request.  So if you have something that doesn't work with the default scope set to request, then you should have the same problem when you change the default scope to local.
 
Now, changing it back to User, (which was the default configuration before the Aussies got a hold of it) could possibly fix/break code that you have written.  I wish the folks that created Tango would have just decided for the developers to have the default scope be request/local.  "User" was a stupid default setting in the first place, and there really is no need for customizing this setting, because if you're using anything other than local, you're doing it wrong.
 
/John
----- Original Message -----
Sent: Tuesday, November 12, 2002 4:23 PM
Subject: RE: Witango-Talk: 'data' system variable

Good Catch.

Yes, the default scope changed to Request

DEFAULTSCOPE=request (line item in Witango.ini)

So, if you use @@reasons without a scope the server will interpret it as @@request$reasons

 

A quick way to fix this would be to change the DEFAULTSCOPE in the INI back to local

I have made it a habit to include scope at all times

Ben Johansen - http://www.pcforge.com
Authorized Witango Reseller
http://www.pcforge.com/WitangoGoodies.htm 
Latest downloads & List Archives @
http://www.witango.ws

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Storey, Paul
Sent: Tuesday, November 12, 2002 9:48 AM
To: Multiple recipients of list witango-talk
Subject: 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