I have a window containing two graph builders, pulling from two different datasets, and I want to filter both graphs with a single Data Filter. I don't think this is possible. I've thought about instead using two "synced" data filters, but couldn't figure it out. Last week at JMP Discovery, @danschikore pointed me toward event handlers as a possible solution for using two synced filters. I think I'm close to getting it to work, but I'm stuck.
The script below creates the two filters and two graphs. I want the selections made in the top filter to be automatically reflected in the bottom filter. Once that works, I will hide the bottom filter and the user will see one filter controlling both graphs.
As it is now, when the user makes a selection in the top filter, the script prints that Where clause to the log using "Get Where Clause", but I need to apply this where clause to the bottom filter. I want a command like "Set Where Clause" that would let me shove that where clause text into the bottom filter, but it doesn't seem to exist. I'm really hoping to avoid the scenario where I have to "unpack" the text string (below) and turn it into a form I can pass to the lower filter.
Select Where( :name == \!"ALICE\!" | :name == \!"BARBARA\!" )
Just to convince myself I can get the first filter to control the second one in some fashion, I have the first filter clearing the second filter's selection. That means I can talk to both filters; I can extract the where clause from the first; I just can't apply it to the second.
As a bonus question: Once this syncing works. I want to hide the second filter. The last line of the script hides the first filter. Does anyone know how I could modify this to hide the second filter instead?
Thanks,
Tom