Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Composite key issue

Hi,

I'm facing an issue when am trying to create a composite key in Final layer to link 2 fields in a table.

eg: I have 2 tables Incident and Solution. I have connected these 2 tables by using "SOLUTION_ID" field. In chart am getting inconsistent data, since the "Period" field in both the tables 're pulling the records which 're not similar. So decided to link the Period field as well. But if I do this, I will get a synthetic key. To avoid this, am trying to create a Composite key by using these 2 fields as below

Incident table: Field1: SOLUTIONBASEID renamed as SOLUTION_ID. Field2: AppYearPeriod

Solution table: Field1: SOLUTION_ID, Field2: Period.

Now the datamodel has connections between Incident and Solution table by using SOLUTION_ID.

Composite key:

AppYearPeriod &'|'& SOLUTION_ID as PeriodSolnIDKey (as Composite key).

I'm stuck here and no idea in how many places we need to give this in the script.

I'm trying to locate the composite key below this statement in the script in 4 places.

Closed_year & Closed_Period as AppYearPeriod

Open_year & Open_Period as AppYearPeriod

Errors during reload:

"AppYearPeriod" field not found and Incident table not found. Please help me by give some suggestions how to come out of this situation.

Your help would be highly appreciated.

Thanks

Velan


4 Replies

Re: Composite key issue

Hi Velan,

In your case go for link table concept, please post the app or details of the both tables with the details about the similar data between two tables.

Not applicable

Re: Composite key issue

Please provide the script and your data model to help on the problem.

Not applicable

Re: Composite key issue

Hi,

Thanks for your suggestions. I have done this by using Link table.

Regards

Velan

Re: Composite key issue

Hi Velan,


If your issue is resolved, can please mark it as answered and close this thread.


Regards,

@vi