Search code examples
spotfire

Spotfire control table values based on column value in another table


I need to control the data being shown on table Collections and Delivery based on what I click on Table A column value on Spotfire.

For example we have the three tables below:

When the user clicks on a column on Dashboard Table let's say BO: BN. On Delivery and Collections Table only BO row should only appear.

How can you do this in Spotfire?

Note: The three tables have a relationship via Code and Branch column. enter image description here

Additional data: Collections and Deliveries table takes its data from DB using parameterized SQL Query. There are three parameters that needs to be satisfied so that the query will work and data will be retrieved these are

StartDate EndDate Branch

I don't have a problem with the Date parameters but with the Branch see below SQL Query
enter image description here



The branch parameter value is controlled by specifying/entering a value on the input field on text area.
enter image description here

Deliveries and Collections table is configured to refer to this value to display the data.


enter image description here
enter image description here

The suggested solution worked great, but I have this extra dependency which makes it a bit more difficult to work out a solution. Do you have any ideas on how to go about this?


Solution

  • @dimas- One way to do this is creating detail visualization tables for Collections and Delivery from 'Dashboards table'.

    Assuming that the three tables have relationship, please follow the below steps.

    Step 1: Right click on Dashboards table and select Create Details visualizations -> Table. It prompts you to select a table, select 'Collections' tables.

    Step 2: Repeat Step 1. But, this time select 'Delivery' table.

    The Dashboards table now controls what data to show in Collections/Delivery tables based on the row selection.

    Output:

    enter image description here

    Please ensure that you right click on the table and select Properties > Data > All data for Collections and Delivery table (screenshot below) if you want to show all rows if nothing is selected in Dashboards table.

    <code>enter image description here</code>