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: 
Not applicable

Field Not Found!!

Hi All,

    I have tried to run the below code, but it keeps coming up with CASE_TYPE Field not found error anytime I run the script, while the field clearly is on the database because I pull the field using my SELECT statement.

Code:

IF([TIER]='GOLD',

    if(match([Case_Type],'Incident'),

IF([DECODE_PRIORITY]='High' AND [Arrival to Resolve Days]<=1,'SLA MET',

IF([DECODE_PRIORITY]='Urgent' AND [Arrival to Resolve Days]<=1,'SLA MET',

If([DECODE_PRIORITY]='Medium' AND [Arrival to Resolve Days]<=3,'SLA MET',

IF([DECODE_PRIORITY]='Low' AND [Arrival to Resolve Days]<=10,'SLA MET','SLA Not Met'))))),

    IF([TIER]='GOLD',

    if(match([Case_Type],'Request'),

IF([DECODE_PRIORITY]='High' AND [Arrival to Resolve Days]<=1,'SLA MET',

IF([DECODE_PRIORITY]='Urgent' AND [Arrival to Resolve Days]<=1,'SLA MET',

If([DECODE_PRIORITY]='Medium' AND [Arrival to Resolve Days]<=5,'SLA MET',

IF([DECODE_PRIORITY]='Low' AND [Arrival to Resolve Days]<=10,'SLA MET','SLA Not Met'))))),

    IF([TIER] = 'SILVER',

IF([DECODE_PRIORITY]='High' AND [Arrival to Resolve Days]<=3,'SLA MET',

IF([DECODE_PRIORITY]='Urgent' AND [Arrival to Resolve Days]<=3,'SLA MET',

IF([DECODE_PRIORITY]='Medium' AND [Arrival to Resolve Days]<=10,'SLA MET',

IF([DECODE_PRIORITY]='Low' AND [Arrival to Resolve Days]<=20,'SLA MET','SLA Not Met'))))))) as SLA;

omarbensalem

stalwar1

1 Solution

Accepted Solutions
OmarBenSalem

Then based on Bill analysis, try to change your load part:

if(match([CASE_TYPE],'Incident'),

View solution in original post

9 Replies
OmarBenSalem

Can you share your whole script of this table?

With the load AND select statements?

Not applicable
Author

Hi Omar,

      Please find the attached script. ignore the commented out codes, as I am only trying to test LOAD STATEMENT lines of codes. Thanks

Anonymous
Not applicable
Author

For this bit of your script that is part of your sql query :

Decode(case_type ,0,'Incident'

                        ,1,'Request'

                        ,2,'Request') AS Case_Type

Put Case_Type in double quotes


Decode(case_type ,0,'Incident'

                        ,1,'Request'

                        ,2,'Request') AS "Case_Type"

Most variants of SQL databases will auto convert the field name to uppercase without the double quotes and Qlik is case sensitive.

Not applicable
Author

Hi Bill,

    When I did this, it gave me an error with the connector.

OmarBenSalem

Then based on Bill analysis, try to change your load part:

if(match([CASE_TYPE],'Incident'),

Greg_Williams
Former Employee
Former Employee

I know this is elementary, but have you considered only doing the first little section. Test that, Make sure it works, then add the rest of the script. The match will return a value, then an evaluation of true/false will be the result from the number returned.

-gw

Not applicable
Author

Thanks!! this works

kkkumar82
Specialist III
Specialist III

Hi Victor,

What are the values in the field which is causing you error

Not applicable
Author

Its the field CASE_TYPE, but Omar has resolved it for me, I had to make it upper case.