Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have two fields (we'll call them fieldA and fieldB). Is there a way to get a list box to filter on both of them? FieldA and fieldB can have either a value of "Us" or "Client".
I then want the list box to have options of "All", "Us", or "Client". All should show every record. If "Us" is selected, then records should only display if both FieldA and FieldB contain a value of "Us". If "Client" is selected, then if either fieldA or fieldB have a value of client, then the record should display.
Thank you!
I ended up creating a third list box of the possible values for the two fields. I then used the getFieldSelections() property to determine what was selected. I then used the selected value in expressions to filter my chart.
Hi K_kickel,
Is it possible for you to attach an example .qvw file that illustrates your problem? Right now I'm a bit confused when reading the description of what you're trying to build.
Hi,
Have a look at the attached application. I`m not able to completely understand your question.
If this application doesnt fix your problem, post your sample data and application.
- Sridhar
Thank you both for your replies. Sridhar, that is very close to what I want, but there is one difference. The "All" and "Us" options are exactly how I want them. It's correct that when I select "All" that both Client and US contain data (are not grayed out in the Field1 or Field2 List boxes). It's also correct that when I select "Us" in Field3 that only the "Us" value in Field1 or Field2 have data (the client values are grayed out in the Field1 and Field2 list boxes).
The difference from what I need to do is that right now, when I select "Client" in Field3, it only shows data for the "Client" option in Field1 and Field2 (Us is grayed out in both select boxes). When I select "Client" in Field3, if either Field1 has a value of client or Field2 has a value of client for that record, then it should be counted as "Client" in field3. So, when selecting "Client" in Field3, there would be "Us" values in Field1 (if Field2 is a value of client for the record) and in Field2 (if Field1 is a value of client for that record).
Below is a simplified version of my load script. The Data from the KeyData field corresponds to MasterData and MasterData2. If the record in KeyData has a value of "Client" for either Field1 in MasterData, or Field2 in MasterData2, it should be considered a Client Record (even if it has a value of Us in the other corresponding field.) For a record to be considered an "Us" record in filtering, it must have a value of "Us" both in Field1 in MasterData, and Field2 in MasterData2. After thinking about it some more, I don't really need the All Option, since they can just clear the list box to see everything.
KeyData:
LOAD
keyField1,
keyValue1,
masterKey,
masterKey2
FROM
[KeyQvd.qvd]
(qvd)
MasterData:
LOAD
masterKey,
masterValue,
if(masterResp= 'CL', 'Client', 'Us') As Field1
FROM
[MasterQVD.qvd]
(qvd);
MasterData2:
LOAD masterKey2,
masterValue2,
if(master2resp = 'LAT' OR 'SAS', 'Client', 'Us') As Field2
FROM
[Master2.qvd]
(qvd);
Please let me know if this helps clarify what I am asking.
Thank you!
I ended up creating a third list box of the possible values for the two fields. I then used the getFieldSelections() property to determine what was selected. I then used the selected value in expressions to filter my chart.