Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

selecting the second filter through macro

FOR EXAMPLE:

FIRST OBJECT I HAVE THREE CONTRIES:

BRAZIL, EUA, CANADA

SECOND OBJECT I HAVE FOUR CONTRIES:

WHEN I SELECT THE FIRST OBJECT (FOR EXAMPLE BRAZIL); THE SECOUND OBJECT ALSO IS SELECTED SHOWING BRASIL.



BRAZIL, EUA, CANADA, MEXICO

3 Replies
pover
Luminary Alumni
Luminary Alumni

Is the data between the 2 objects related? Do you want them to be independent and apply a different filter for each object?

Regards.

Not applicable
Author

Actually I have a system that provides real data. I'm importing data from excel (budget). So I have two data objects (actual vs. budgeted). When I select the filter for real I can´t select the budgeted data because there isn´t relationship. I need a macro that identifies the filter from real data and activate the budget.

pover
Luminary Alumni
Luminary Alumni

Instead of a macro, you can create the action Select in Field that is triggered when you select one of the fields. Or if you aren't working in QV 9 yet, the macro should be something like below:

sub Select_Other_Field
ActiveDocument.Fields("Mes").Select "=Mes=max(total Mes)"
end sub

Or the best solution is to concatenate the budget and transactions table into the same table. Of course you add an additional column that identifies each row as real or budget and then you don't have to mess with actions or macros because the data shares the same filters.

Regards.