Creating temporary variable in column code

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

Creating temporary variable in column code

Postby ftang » Sun Jan 04, 2009 5:38 pm

Is it possible to create a temporary variable in my column code? For example:

myint integer;
myint = 5;

ty
ftang
 
Posts: 14
Joined: Wed Apr 23, 2008 8:26 pm

Re: Creating temporary variable in column code

Postby kraada » Mon Jan 05, 2009 10:32 am

I believe you can do this sort of things using the Variables tab of the custom stats creation area, though I honestly haven't worked much with the variables, so I'm not sure exactly how they work for certain things (like typecasting).
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Creating temporary variable in column code

Postby ftang » Mon Jan 05, 2009 2:38 pm

I don't think that you can refer to a variable in column code. You can refer to a variable in a statistic and then add a statistic to a reports stat.
ftang
 
Posts: 14
Joined: Wed Apr 23, 2008 8:26 pm

Re: Creating temporary variable in column code

Postby kraada » Mon Jan 05, 2009 2:47 pm

What are you trying to do? If I had an idea what stat or report you're trying to build, I might be able to think of another way to get it to work.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Creating temporary variable in column code

Postby WhiteRider » Tue Jan 06, 2009 12:10 pm

I don't think you can currently do what you want, but I've suggested a similar 'string replacement' type of variables to the development team.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Creating temporary variable in column code

Postby ftang » Tue Jan 06, 2009 2:19 pm

I was just trying to create a temporary variable so that I wouldn't have to hardcode my position (on the button, utg, etc.) in my column expression.
ftang
 
Posts: 14
Joined: Wed Apr 23, 2008 8:26 pm

Re: Creating temporary variable in column code

Postby kraada » Tue Jan 06, 2009 3:50 pm

Yeah, that sort of thing isn't possible yet but hopefully someday it will be.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 6 guests

cron
highfalutin