Choose Language Hide Translation Bar
Highlighted
khusodo
Level I

JSL to remove virtual join Reference Link?

Does anyone know what the JSL script is to remove a reference link (of a virtual join)?

The link below describes the script to create a Link ID and a reference link. I'd like to write a script that reverses that process.

 

https://www.jmp.com/support/help/14-2/virtually-join-data-tables-2.shtml

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
gzmorgan0
Super User

Re: JSL to remove virtual join Reference Link?

@khusodo,

A Link ID is a column property assigned in an auxiliary table.

 

 

dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" );
dt1:ID << Set Property( "Link ID", 1 );
// add Link ID and turn it on

 

The Link Reference is a column property that "references" the information in the auxiliary table. Both dt1 abd Dt2 must have a column called ID. 

 

dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" );
dt2:Choice1 << Set Property( "Link Reference", Reference Table( "$SAMPLE_DATA/Pizza Profiles.jmp" ) );
dt2:Choice2 << Set Property( "Link Reference", Reference Table( "$SAMPLE_DATA/Pizza Profiles.jmp" ) );
dt2:Choice << Set Property( "Link Reference", Reference Table( "$SAMPLE_DATA/Pizza Profiles.jmp" ) );
// add Link Reference to the Choice1, Choice2, and Choice columns

When both tables are open, an interactive analysis directed at the main table will display columns from both the main (dt2) and auxiliary (dt1) tables.

 

  1. Close the auxiliary table, rather than unlinking, especially, if the link might be used later, possibly for a different file.
  2. To remove the links and or references
dt1:ID << Set Property("Link ID",0)  ;
dt2:Choice1 << delete property("Link Reference");
dt2:Choice2 << delete property("Link Reference");
dt2:Choice << delete property("Link Reference");

 

 

View solution in original post

1 REPLY 1
Highlighted
gzmorgan0
Super User

Re: JSL to remove virtual join Reference Link?

@khusodo,

A Link ID is a column property assigned in an auxiliary table.

 

 

dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" );
dt1:ID << Set Property( "Link ID", 1 );
// add Link ID and turn it on

 

The Link Reference is a column property that "references" the information in the auxiliary table. Both dt1 abd Dt2 must have a column called ID. 

 

dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" );
dt2:Choice1 << Set Property( "Link Reference", Reference Table( "$SAMPLE_DATA/Pizza Profiles.jmp" ) );
dt2:Choice2 << Set Property( "Link Reference", Reference Table( "$SAMPLE_DATA/Pizza Profiles.jmp" ) );
dt2:Choice << Set Property( "Link Reference", Reference Table( "$SAMPLE_DATA/Pizza Profiles.jmp" ) );
// add Link Reference to the Choice1, Choice2, and Choice columns

When both tables are open, an interactive analysis directed at the main table will display columns from both the main (dt2) and auxiliary (dt1) tables.

 

  1. Close the auxiliary table, rather than unlinking, especially, if the link might be used later, possibly for a different file.
  2. To remove the links and or references
dt1:ID << Set Property("Link ID",0)  ;
dt2:Choice1 << delete property("Link Reference");
dt2:Choice2 << delete property("Link Reference");
dt2:Choice << delete property("Link Reference");

 

 

View solution in original post

Article Labels

    There are no labels assigned to this post.