Discussion Board for collaboration related to QlikView App Development.
All good health
There are table describes the article and sub
structure:
The foreign key Name, Internal key
If the internal key is null, it is article,
if the internal key is not null, it is a subarticle
How to make two lists Article and subarticle?
the example table
PaymentTypeId ; Name ; ParentId
-1 ; System ; null
0 ; Depositing ; -1
1 ; Payment document ; -1
10 ; Manager ; null
11 ; Receipts ; 10
12 ; Documents ; 10
For example, these two LOAD statements separate articles from subarticles but keep their relations...
Articles:
LOAD PaymentTypeId AS ArticleId, Name AS ArticleName
FROM YourDataSource
WHERE len(trim(ParentId)) = 0;
SubArticles:
LOAD ParentId AS ArticleId, PaymentTypeId As SubArticleId, Name As SubArticleName
FROM YourDataSource
WHERE len(trim(ParentId)) > 0;
For example, these two LOAD statements separate articles from subarticles but keep their relations...
Articles:
LOAD PaymentTypeId AS ArticleId, Name AS ArticleName
FROM YourDataSource
WHERE len(trim(ParentId)) = 0;
SubArticles:
LOAD ParentId AS ArticleId, PaymentTypeId As SubArticleId, Name As SubArticleName
FROM YourDataSource
WHERE len(trim(ParentId)) > 0;
or instead of
Where len(trim(ParentId)) = 0
we can use this condition for Articles
Where IsNull(ParentId)
and for SubArticles:
Where Not IsNull(ParentId)
u can follow pcammaert advice.
Thank you for your help, very helpful