Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

Scripting problem - plz help!

Hi,

I have a very strange problem in my script: A few records disappear for no apparent reason - even worse:

=> In one and the same LOAD statement, I load a field twice - once, all is ok - the other time, certain values are missing...

I will for now just post the piece of the script where I have a problem as I'm absolutely sure the problem is in that part.

// Here I load a filtering table to load only those values of PERSEH that I need for my chart
Filter_emps:
LOAD
    
PERSEH as Vorg_einh,
    
PERSEH as Vorg
FROM
[\\rgb1sfs201\Regensburg\Common\03-HR\adicom_Vorgängereinheiten.xls]
(
biff, embedded labels, table is [Gesamtmapping$]);

MA_Grunddaten_#3_pre:
LOAD
//    Recno() as Line,
    Pers_Nr4 as Pers_Nr5,
   
Kennz as Kennz_2,
   
Eintritt as Eintritt_2,
   
Month(Eintritt) as Eintrittsmonat_2,
   
year(Eintritt) as Eintrittsjahr_2,
   
Austritt as Austritt_2,
   
Month(Austritt) as Austrittsmonat_2,
   
year(Austritt) as Austrittsjahr_2,
   
IF(Austritt <= TODAY(), Austritt, TODAY()) as Enddatum_2,
//    Kostenstelle,
    Vorgängereinheit as Vorg_einh,
   
Vorgängereinheit as Pers_einh
RESIDENT MA_Grunddaten
//WHERE (Kennz = '7' OR Kennz = '8')
WHERE    EXISTS(Vorg, Vorgängereinheit)

As you see, this is a RESIDENT LOAD, I have my base_load from the database in an earlier part of the script. The relevant point is this field "Vorgängereinheit": I load this twice because once it is being used as a key to link to "Filter_emps" and the other one is used for further processing.

The strange thing is this: In the field "Vorg_einh" (the key_field), certain values are included - all values are there actually. When, in the table "Filter_emps", I select those values in the field "Vorg", the field "Vorg_einh" follows that selection, the values are there.

<=> The field "Pers_einh" (the name is used for the first time in this table) does not follow the selection, the values are NOT there.

Can anybody help me see through this?

Thanks a lot!

Best regards,

DataNibbler

2 Replies
datanibbler
Champion
Champion
Author

Okay,

I guess this problem has just turned out a phantom:

=> There are no employees in that area, so quite naturally QlikView cannot load anything..

Gysbert_Wassenaar

Simple. The field Vorg_einh contains all values from both Filter_emps and MA_Grunddaten_#3_pre. Pers_einh contains only the values from MA_Grunddaten_#3_pre. In sheet objects it doesn't matter which table the value came from. There are only fields with values. The tables you created in the script are just names that have no meaning or purpose anymore in sheet objects.


talk is cheap, supply exceeds demand