-
Need a variable to assign , help needed
Celambarasan Adhimulam Feb 15, 2012 4:56 AM (in response to Gerard Carvalho)Hi,
Try with this
vVariable= chr(39)&Concat(ID,chr(39)&','&chr(39));
Hope it helps
Celambarasan
-
Re: Need a variable to assign , help needed
Ashok Chandran Feb 15, 2012 5:15 AM (in response to Celambarasan Adhimulam )Hi
Hope the attached file will be clarified your doubt and help to get solution for your problem
Regards
Ashok
-
Re: Need a variable to assign , help needed
Gerard Carvalho Feb 15, 2012 6:00 AM (in response to Celambarasan Adhimulam )When i try your code i am getting a eroor while loading the script
LET vVariable= chr(39)&Concat(OPRID,chr(39)&','&chr(39))
Error: Aggregation expressions not allowed in GROUP BY clause
-
Re: Need a variable to assign , help needed
Ashok Chandran Feb 15, 2012 6:14 AM (in response to Gerard Carvalho)Hi
Hope this will be helpful for your problem
Concat(chr(39)&ID&chr(39), ',')
use this in your script load
refer the sample attached qv file
Regards
-
Sample.qvw 126.0 K
-
Need a variable to assign , help needed
Sunil Chauhan Feb 15, 2012 6:23 AM (in response to Ashok Chandran)use below code
set vcon=concat(Month,',');
Data:
LOAD * INLINE [
Product, Year, Month,Sales
A, 2011, Jan, 1000
A, 2012, Feb, 2000
A, 2013, Mar, 3000
];
and use in text box
$(vcon)
hope this helps
-
-
Re: Need a variable to assign , help needed
Ashok Chandran Feb 15, 2012 6:41 AM (in response to Gerard Carvalho)Hi
In Loding Script , use this
set vVar = Concat(chr(39)&Month&chr(39), ',');
Data:
LOAD * INLINE [
Product, Year, Month,Sales
A, 2011, Jan, 1000
A, 2012, Feb, 2000
A, 2013, Mar, 3000
];
and use in text box
$(vVar)
it will return the answer like this
'Feb','Jan','Mar',
for that variable
Regards
Ashok
-
Re: Need a variable to assign , help needed
Celambarasan Adhimulam Feb 15, 2012 6:47 AM (in response to Gerard Carvalho)Hi,
Where you going to use the variable expression?in Load script or in charts?
Celambarasan
-
Re: Need a variable to assign , help needed
Gerard Carvalho Feb 15, 2012 6:55 AM (in response to Celambarasan Adhimulam )In the script... i want to load some user id in a variable so that i can use the variable in any number of table to exclude the user id in that variable.
-
Need a variable to assign , help needed
Celambarasan Adhimulam Feb 15, 2012 7:02 AM (in response to Gerard Carvalho)Hi,
To use in Load
IDTable:
Load *Inline
[ID
aa32eee
aa22rrrd
bb24rtrt
cc65sdf];
TempID:
Load
chr(39)&Concat(ID,chr(39)&','&chr(39)) as ALLID
Resident
IDTable:
LET vID= FieldValue('ALLID',1);
Drop Table TempID;
Hope it helps
Celambarasan
-
-
-
-
-
Need a variable to assign , help needed
Sunil Chauhan Feb 15, 2012 4:57 AM (in response to Gerard Carvalho)control +alt +v
add -> varable name
vID=Concat(ID,',')
use
=$(vID) to text or any where your want
or
directely
=
vID=Concat(ID,',')
hope this helps
-
Re: Need a variable to assign , help needed
Ashok Chandran Feb 15, 2012 5:16 AM (in response to Gerard Carvalho)Hi
Attached Sample file
-
Sample.qvw 126.0 K
-
Re: Need a variable to assign , help needed
Gerard Carvalho Feb 15, 2012 5:58 AM (in response to Ashok Chandran)In the attached sample, the month jan and feb are hardcoded... But how you can get the month field name alone so that it will display 'jan',feb','mar'
-
-
Re: Need a variable to assign , help needed
Everardo Mancilla Apr 26, 2012 7:21 PM (in response to Gerard Carvalho)IDS: load * inline [ ID aa32eee aa22rrrd bb24rtrt cc65sdf ] ; SET vVariable = ''; For i=0 to NoOfRows('IDS')-1 If len('$(vVariable)')>0 then Let vVariable='$(vVariable)'&Chr(44)&Peek('ID',$(i),'IDS'); ELSE Let vVariable=Peek('ID',$(i),'IDS'); END iF NEXT i ;