I have 2 different tables in which I have information about 3 Plants. Unfortunately, each Plant uses a different logic for the connection between the 2 tables like below (the names are the field names):
|Plant||Table 1||Table 2|
|A||Reference No||Tracking ID|
|B||Sub Ref No||Tracking ID|
|C||Sub Ref No||Loading ID|
What I tried to do is to use 'if' statements in each load script to rename the fields to a common field based on the Plant condition. Something like below.
If(Plant='A', "Reference No" = TableKey,
If(Plant='B' or Plant='C', "Sub ref no" = TableKey))
If(Plant='A' or Plant='B', "Tracking ID" = TableKey,
If(Plant='C', "Loading ID" = TableKey))
I am not sure this is the right logic to get these things done. In addition, when trying to load the scripts, Qlik Sense gives the error that Field 'TableKey' not found.
Any help is appreciated! Thanks!