Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
AmCh
Creator
Creator

Linking two tables

Hi all,

I have as an example the following table and fields:

Table_a

SystemsValue_aValue_b
A1... 
A2  
A3  
B1  
B2  
B3  
C1  
C2 ...

 

and independent fields:

 

System A
A1
A2
A3

 

System B
B1
B2
B3

 

System C
C1
C2

 

Input:

Enduser selects from each Field (System A, B and C) a value. As an example hier: A1,B1 and C1.

Desired output:

Field Systems from Table_a should based on the previous selections show only A1,B1 and C1 and there the enduser can select a value between A1, B1 and C1 from the same field.

Any help please?

Thanks in advance.

 

4 Replies
OceanView
Contributor II
Contributor II

I would recommend creating 3 inline tables, one for each of the System A, B, C

load* inline [
SystemA
A1
A2
A3
];

Then, in the dimensions field, you can create a calculated dimension like this:

=if(SubStringCount(GetFieldSelections(SystemA),Case),Case,if(SubStringCount(GetFieldSelections(SystemB),Case),Case,if(SubStringCount(GetFieldSelections(SystemC),Case),Case,'')))

 

This will result in nothing showing if there are no selections for System A, System B, or System C.  You can create a Document Settings/Trigger such that if nothing is selected, all of them get selected for the the System selections.

AmCh
Creator
Creator
Author

Thanks @OceanView  for your reply.

I don't want to create a new dimension field. I want only to make changes on existing field, from which other fields from the same table are depending.

Changes: Based on previous selections, the already existing field should 'ban' the remaining non selected values.

I want to preserve the field Systems and not to create a new one, because based on it I have other calculations to perform.

I hope that you understand my issue and to help me further!

Thanks in advance.

krishna_2644
Specialist III
Specialist III

Check the attached qvw.

Capture.JPG

thnx

K

AmCh
Creator
Creator
Author

@krishna_2644 Thanks for your reply.

The idea linking tables with creating a commun key is good, but it has a problem that by choosing A1, you're imposing choosing B1 and C1 (because you setted for A1, B1 and C1 the key value=1).

 

Any help please?

Thanks in advance.