cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

Linked columns and inter-table row selection

ehchandlerjr
Level V

Hello - I don't think this exists, but thought I would ask anyway. I have a few different projects where I link columns. I have had a few times where I have thought that it would be super useful to be able to select the row of one of the linked tables, and then the corresponding rows in the other gets highlighted. I have one 50k row table and another 150k row table, and scrolling through can get tedious, as can trying to grab just those points. Of course there are row selection menus, but this takes a long time when you are switching your selection a few dozen times. 

 

Is there a way to do this?

 

Thanks!

Edward Hamer Chandler, Jr.
3 ACCEPTED SOLUTIONS

Accepted Solutions
mmarchandTSI
Level V


Re: Linked columns and inter-table row selection

Event Handler can accomplish what you're describing.  Something like this:

 

mmarchandTSI_0-1701179831673.png

 

For readability/copy/paste:

 

Function( {thisTable, thisColumn, iRow},
{ /* list of local variables, if needed */ },
dt2 << Select Where(:name == thisTable:thisColumn[iRow] )
);

View solution in original post

mmarchandTSI
Level V


Re: Linked columns and inter-table row selection

The Event Handler Column Property performs an action when you click on a row in the column, so this solution would be for only very simple selections, one at a time.  Are you thinking you'd like to select corresponding rows in the linked table every time you select a row or group of rows in the main table?  If so, I'd consider adding a simple table script.

 

sel = :name[Current Data Table() << Get Selected Rows];
dt << Select Where( Contains( sel, :name ) );

If you save that as a table script, you can select the rows you want and then just click the green triangle.  Sure beats scrolling through 100,000 rows!

View solution in original post

hogi
Level XII


Re: Linked columns and inter-table row selection

That's really cool - thanks for asking - thanks for the nice solution

 


@ehchandlerjr wrote:

Kinda seems like an obvious and easily implementable feature for linked data tables. At least to have a checkbox to turn the feature on or off, since it might be annoying sometimes.


For linked data tables, actually, there exists such a one-click checkbox:

sourceTable:linkID << Set Property( "Link ID", 1 );

targetTable:linkID << Set Property(
	"Link Reference",{	Reference Table( sourceTable), Options( Row States Synchronization with Referenced Table( Dispatch( 1 ), Row States( Select ) ))
);

 

Linked_select.mp4
Video Player is loading.
Current Time 0:00
Duration 0:00
Loaded: 0%
Stream Type LIVE
Remaining Time 0:00
 
1x
    • Chapters
    • descriptions off, selected
    • captions off, selected
      (view in My Videos)

      View solution in original post

      7 REPLIES 7
      mmarchandTSI
      Level V


      Re: Linked columns and inter-table row selection

      Event Handler can accomplish what you're describing.  Something like this:

       

      mmarchandTSI_0-1701179831673.png

       

      For readability/copy/paste:

       

      Function( {thisTable, thisColumn, iRow},
      { /* list of local variables, if needed */ },
      dt2 << Select Where(:name == thisTable:thisColumn[iRow] )
      );
      ehchandlerjr
      Level V


      Re: Linked columns and inter-table row selection

      This is awesome! Thank you so much!

       

      I did notice that you can only do one row at a time. Is there a way to do an arbitrary selection of rows?

       

      Thanks!

      Edward Hamer Chandler, Jr.
      mmarchandTSI
      Level V


      Re: Linked columns and inter-table row selection

      The Event Handler Column Property performs an action when you click on a row in the column, so this solution would be for only very simple selections, one at a time.  Are you thinking you'd like to select corresponding rows in the linked table every time you select a row or group of rows in the main table?  If so, I'd consider adding a simple table script.

       

      sel = :name[Current Data Table() << Get Selected Rows];
      dt << Select Where( Contains( sel, :name ) );

      If you save that as a table script, you can select the rows you want and then just click the green triangle.  Sure beats scrolling through 100,000 rows!

      ehchandlerjr
      Level V


      Re: Linked columns and inter-table row selection

      Dang dude - This is awesome. Extremely helpful. If I could give you two kudos, I would.

       

      Kinda seems like an obvious and easily implementable feature for linked data tables. At least to have a checkbox to turn the feature on or off, since it might be annoying sometimes. Hmmmm. I might add this to the feature requests.

       

      Thanks again! This really helps, and you've introduced me to Event Handler (and that whole bottom section of column properties I never go to). Super useful!

      Edward Hamer Chandler, Jr.
      hogi
      Level XII


      Re: Linked columns and inter-table row selection

      That's really cool - thanks for asking - thanks for the nice solution

       


      @ehchandlerjr wrote:

      Kinda seems like an obvious and easily implementable feature for linked data tables. At least to have a checkbox to turn the feature on or off, since it might be annoying sometimes.


      For linked data tables, actually, there exists such a one-click checkbox:

      sourceTable:linkID << Set Property( "Link ID", 1 );
      
      targetTable:linkID << Set Property(
      	"Link Reference",{	Reference Table( sourceTable), Options( Row States Synchronization with Referenced Table( Dispatch( 1 ), Row States( Select ) ))
      );

       

      Linked_select.mp4
      Video Player is loading.
      Current Time 0:00
      Duration 0:00
      Loaded: 0%
      Stream Type LIVE
      Remaining Time 0:00
       
      1x
        • Chapters
        • descriptions off, selected
        • captions off, selected
          (view in My Videos)

          mmarchandTSI
          Level V


          Re: Linked columns and inter-table row selection

          Good information, @hogi.  I never use actual linked tables, so I hadn't thought about digging into the options there.  Good to know!

          ehchandlerjr
          Level V


          Re: Linked columns and inter-table row selection

          Wow. I had originally mosied over to the column properties for the Link column and didn't see it, but I'm confused why I never thought to look over at the link reference. Thanks for showing that! This thread now has three completely distinct answers.

          Edward Hamer Chandler, Jr.