I have one a table opened by the user.
After some python code I generate another table that ends:
How can link these two tables via JSL?
The functionality I am after is to have something equivalent as if I did a subset in JMP.
// Start of script;
Names Default To Here( 1 );
Clear Log();
dt = Open( "$SAMPLE_DATA/Bands Data.JMP" );
dt << Subset(
Linked,
Suppress formula evaluation( 0 ),
Sampling Rate( 0.9 ),
columns( :timestamp, :proof cut, :viscosity, :caliper, :ink temperature )
)
The scripting index has three examples under Virtual Join.
There's an example of virtual join in Reverse Geocode Lat-Lon to Zip . It saves the tables to disk before using
zipcodeNS:dtdbf:shape << Set Property( "Link ID", 1 );
zipcodeNS:dtshp:shape << Set Property( "Link Reference", Reference Table( zipcodeNS:dtdbf ) );
to link them by the shape property.
Does virtual join create the interactive linking when selecting rows or columns?
In the examples I ran this did not happen.
No, the tables are not linked like a "linked subset". (edit: see @bernd_heinen answer) But they are linked like a join; if you run that first example and change a color name in the table of colors, the change is immediately reflected in the table of people. @chungwei
It is also possible I'm not answering the question you really asked. Perhaps an expert on the Tables menu will take another look.
I understand that the subsetting is just an example. If tables are virtually joined row states can be syncronized between them. In the "parent" table there is the column with the linke reference (the blue keys). When you open that column's properties and look for the "link reference" property, you'll find options there.
Here, you can determine which table shall be driving the row states. All settings can be set by JSL like
Column( "Unique Subject Identifier" ) << Set Property(
"Link Reference",
{Reference Table( "Nic Demographics.jmp" ), Options(
"Use Linked Column Name"(1),
Row States Synchronization with Referenced Table( Accept( 1 ), Row States( Select, Exclude, Hide ) )
)}
)
The one thing, that is not possible, is to transfer selections, no matter if they are made in the parent or the child table.
Cool! had not seen that before.
Why are options like
Options(
"Use Linked Column Name"(1),
Row States Synchronization with Referenced Table( Accept( 1 ), Row States( Select, Exclude, Hide ) )
)
not grabbed by the advanced log?
This may or may not be an issue. I will report this to development, about the action recording to see if we can record that in the log. Thanks for bringing it to our attention.
I want to use Virtual Links between Tables in a Dashboard along the idea:
With
Column( "Unique Subject Identifier" ) << Set Property(
"Link Reference",
{Reference Table( "Nic Demographics.jmp" ), Options(
"Use Linked Column Name"(1),
Row States Synchronization with Referenced Table( Accept( 1 ), Row States( Select, Exclude, Hide ) )
)}
)
I can synchronize the row states.
Do I need to use a non-local data filter to make it work?
There is no option in the Application Builder to use a non-local data filter, but I can modify the script and remove the local.
Is this a good idea?
Better use a Filter State Handler to remote control the data filters of the other tables?