Here is the situation(s):
I am displaying a pie chart in a query. I can do this in two ways:
1. Create a Summary Table that will end up with one record for each of the possible segments on the chart. The summary table has a Product Description and the total count from a Parts Detail table.
2. Use the table with the detail records I am looking for, and have the query aggregate (in this case COUNT) the number of records for each Part Type.
For both methods I can get the Chart to display just like I want it to. No issues on that part of it.
When displaying a chart you can click on a segment and perform some operation. In this case I want to click on a segment and have it run a query to show the individual detail records that made up a chart segment.
Now the issue…
If I use the Summary Table method everything works fine. I tell it to run the query and in the query I have it filter on something like this:
FIND ProductDetails WHERE ProductDetails.Product=ProductSummary.Product ORDER BY ProductDetails.OrderDate DESC
This shows me exactly what I expect; all of the records for the segment that I clicked on.
The record for the segment selected appears to be in context.
The problem comes though, with method #2. I have tried a number of different ways to get this to work, but cannot get it right.
- I have tried running it basically the same as #1, but have no idea what is actually in Context to know how to format the filter. I have tried:
FIND ProductDetails WHERE ProductDetails.Product=ProductDetails.Product
FIND ProductDetails WHERE ProductDetails.Product=ThisProductDetails.Product
FIND ProductDetails WHERE ProductDetails.Product=ThatProductDetails.Product
- I have tried running a process where I use ProductDetails as input to the process and try to find the products first and then display the query. That doesn’t work.
- I have tried running a process that updates a SessionVariable with the Product ID from the Segment, but nothing ever gets into the SessionVariable.
I guess the ultimate question is, how do I know what gets put into context when I click on the segment, so that I can know how to properly format a query or process?
Does this make sense?
Thanks,
Jim