Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've a qvd file with filds 4 with data as shown below:
- I had a list box with B field as shown below:
- Based on selection i want to load qvd file. If user selects only one value we can store that value in one variable and we can use that variable in where condition of qvd file. If user selects multiple values also we can store in a single variable but, how can apply this variable in where condition of qvd file.
For Eg:
LOAD A,
B,
C,
D
FROM
Table1.qvd
(qvd)
WHERE(B = 1);
- i need to apply like this for all fields.
- For your reference i'm attaching my qvw file also.
What i understood is u want to achieve a IN condition by passing multiple values so use the match function for that
Load * from table.qvd
where match(b,$(var);
Hi,
I am not sure, why you want to trigger a refresh a file based on your selection.
Your approach should be to Load all the Data Source and Link them by adding a flag.
Tabl1:
Load B FROM Table1.qvd (qvd);
Tab2:
Load *,
1 AS B FROM Table2.qvd (qvd);
Tab3:
Load *,
34 AS B FROM Table3.qvd (qvd)
and so on.
Based on the selection you should be able to Hide/Display the Data.
Regards,
Amit
Hi,
Actually the think is i had two qvw files. The user can make selections in one qvw file. I'm storing all this selections in different variables and i'm passing this variable to another qvw file.
For Eg:
In first qvw file i had qvd file like this.
Load A,B,C,P,Q,R,S from Table1.qvd;
- I' had taken in listbox like this:
- In button actions i written for variable(vSend) with value GetFieldSelections(F1,',',50) by using this button i'm navigating to another qvw file with this variable.
In second qvw file i had written like this
Load A,B,C,$(vSend) from Table1.qvd;
- Now it loads all fields of particular qvd file. But, while loading the qvd file it should load based on selections done for B,C etc..as i said previously.
What i understood is u want to achieve a IN condition by passing multiple values so use the match function for that
Load * from table.qvd
where match(b,$(var);
Thanks a lot qliksus..
Hi,
I need some help from you again..
- I'm storing all the selections of the following listbox in one variable like this:
- Now the variable vCdata holds the value vCdata=GoodReads,MissingReads,NoReads.
- But how to keep where condition based on this variable to qvd file.
- The field C contains the data like this.
C
Main1:
LOAD A,
B,
C
if(C='No Read','NoReads',if(Len(C)>0,'GoodReads','MissingReads'))as C1,
FROM
Table1
where match(B,$(var) and ..........;
Sorrry for the late reply can u explain again i didnt understand wat u want
ok i'll explain you with detail.
- My qvd file contains the data like this:
- In first qvw file i written in the editscript like this:
Table1:
LOAD
A,
if(A='No Read','NoReads',if(Len(A)>0,'GoodReads','MissingReads'))as A1,
B,
C
FROM
Table1.qvd;
DisplayData:
LOAD * INLINE [
F1
NoReads
GoodReads
MissingReads
];
- Now i had take F1 in listbox and i'm passing all selections of this listbox in variable to another qvw file(i.,e vSend=GoodReads,MissingReads,NoReads)
- In second qvw file i'm loading the qvd file as you said previously. It is working for the field B. B'coz B fields holds the data of passed variable so condition is working properly with Match condtion.
- But now A fields doesn't hods the data of variable vSend.
- I want to apply conditon for A field in second qvw like this
Table1:
LOAD
A,
if(A='No Read','NoReads',if(Len(A)>0,'GoodReads','MissingReads'))as A1,
B,
C
FROM
Table1.qvd where A1='No Read' or A1= 'GoodReads' or A1= MissingReads;
- But i dont want to give like above i want to give like Match(A1,$(vSend))
Try like this then
Table1:
LOAD
A,
A1,
B,
C
where A1='No Read' or A1= 'GoodReads' or A1= MissingReads;
LOAD
A,
if(A='No Read','NoReads',if(Len(A)>0,'GoodReads','MissingReads'))as A1,
B,
C
FROM
Table1.qvd ;
Ya it's working qliksus. Once again thanks a lot if i face any problem in this area i'll approach you.