Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
alec1982
Specialist II
Specialist II

"Field not found" error

Hi,

I have this query and I am having error by not founding the filed clored red below..

Even I have copied the filed name from the source file and paste it in here, i am still getting the error..

and all the fields from that source are loaded before..

the top line that shows on the error window is colored by break.

Anybody knows what could be a possible reason for this error.

Thxs,

tmpImportantDateField:

    LOAD * INLINE [

        SourceTable, DateFieldName, DateFieldLabel

    ];

if (match('$(TARGETDASHBOARDCUSTOMER)', 'IHS') > 0) then

   

        concatenate(tmpImportantDateField)

       

        LOAD * INLINE [

            SourceTable, DateFieldName, DateFieldLabel

            IhsLeaseDataCurrentFY, IhsExpiration, Lease Exp

            MapIhsLeaseData, MapIhsExpiration, Map Lease Exp

            IhsExpiringOptions, IhsExpiringOptionNotify, IHS Expiring Option Notify

           CapexProjectData, LeaseExpiration, Lease Expiration

        ];

          

   

    endif

LET varRowCount = numMax(noOfRows('tmpImportantDateField'), 0) - 1;

    FOR i=0 TO $(varRowCount)

   

        LET varDateFieldName = peek('DateFieldName', $(i), 'tmpImportantDateField');

        LET varDateFieldLabel = peek('DateFieldLabel', $(i), 'tmpImportantDateField');

        LET varSourceTable = peek('SourceTable', $(i), 'tmpImportantDateField');

   

        // lookup the min and max dates from the source table

        tmpDateRange:

        LOAD

            min(%$(varDateFieldName)DateKey) AS MinDateKey,

            max(%$(varDateFieldName)DateKey) AS MaxDateKey

        RESIDENT

            $(varSourceTable);

       

        // use "peek()" to inspect rows in the table to assign to the variable

        LET varMinDate = num(peek('MinDateKey', 0, 'tmpDateRange'));

        LET varMaxDate = num(peek('MaxDateKey', 0, 'tmpDateRange'));

        DROP TABLE tmpDateRange;

5 Replies
Not applicable

Hi,

I have a question for this part of the code...

LOAD * INLINE [

            SourceTable, DateFieldName, DateFieldLabel

            IhsLeaseDataCurrentFY, IhsExpiration, Lease Exp

            MapIhsLeaseData, MapIhsExpiration, Map Lease Exp

            IhsExpiringOptions, IhsExpiringOptionNotify, IHS Expiring Option Notify

           CapexProjectData, LeaseExpiration, Lease Expiration

        ];

are you trying to concatenate this table to the above temp table with the first three field as same.

Because in inline the next rows after source table, datefieldname and datefieldlabel... would be considered as data and not individual fields anymore.

alec1982
Specialist II
Specialist II
Author

good question!.. The code is not mine but I was trying to follow the same steps they did.

Yest i am concatenating the tables to the above table.

it works perfectly for the first three line but the red one is giving me hard time.!

Thxs,

Not applicable

Oh ok I get your point,

If you want to concatenate two tables with some of the fields matching then try this:

But first thing first: Inline load is used when you are loading some data within the QVW itself. That means it doesn't have any datasources. In other terms you are hard coding data.

Table1:

Load * inline

[

A, B, C

];

concatenate(Table1)

Load * inline

[

A, B, C, D, E, F, G, H, I , J,

K, L, M, N, O, P, Q

];

Please follow here: the moment you would write  anything on the second row it will be considered as data. Although from K to Q it might be field names. Or you will have to place everything in one line A to Q separated by commas.

instead do this:

concatenate(Table1)

Load * A,

B,C,...Q

From "some DataSource"

;

alec1982
Specialist II
Specialist II
Author

I agree on your point. but I want to do is different.

the code is working fine without adding the red line..

once I add that one i get an error that Field LeaseExiration Not found.

Thxs,

Not applicable

if it isn't a big file or has company sensitive data...can you share you application.

Then probably we can have a look.

Bikash