Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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
Esteemed Contributor

Re: Field Not Found!!

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

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

9 Replies
OmarBenSalem
Esteemed Contributor

Re: Field Not Found!!

Can you share your whole script of this table?

With the load AND select statements?

Not applicable

Re: Field Not Found!!

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

Re: Field Not Found!!

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

Re: Field Not Found!!

Hi Bill,

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

OmarBenSalem
Esteemed Contributor

Re: Field Not Found!!

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

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

Employee
Employee

Re: Field Not Found!!

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

Re: Field Not Found!!

Thanks!! this works

kkkumar82
Valued Contributor III

Re: Field Not Found!!

Hi Victor,

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

Not applicable

Re: Field Not Found!!

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

Community Browser