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

how to execute subfield() function in qlikview?

hi guys,

I create a table box with  sub field function. In script page I use a sub field () function after I reload this script but It did not execute perfectly,it shows error, i do not know how to overcome this problem. please tell me out  how to solve this problem. I attached snipping file below this box.

Regards:

madhu

22 Replies
tresesco
MVP
MVP

Change 'skills'  to 'Skills'.      // S - in capital.

swuehl
MVP
MVP

First, table names are case sensitive, so your resident load should be

...

Resident employskills;

Then:

Field names are also case sensitive and emp does not exist in table employskills.

sushil353
Master II
Master II

Hi,

What is the error you are getting?

Skills not skills

also check your first field name it is employeeno and you have taken emp..

HTH

Sushil

Peter_Cammaert
Partner - Champion III
Partner - Champion III

You are loading a field "emp" that is not available in your source table. And QlikView is case sensitive, meaning that you have to spell all fieldnames exactly like they were defined. Field "Skills" is available, but "skills" isn't.

Best,

Peter

its_anandrjs

Write like

Subfield(Skills,',',1 )   put location of the ',' or share the sample.

Or

Subfield(Skills,',')

Not applicable
Author

in the below table script, Field name and table name must be same as above .

Use employeeno instead of emp,

Skills instead of skills,

and emloyskills instead of Employskills.

emloyskills:

Load employeeno,

Skills

   
FROM
[...\Data\Employskills.xlsx]
(
ooxml, embedded labels, table is Sheet1);

indskills:

Load
employeeno, SubField(Skills,',') as Skills

Resident emloyskills;

Drop Table emloyskills;

its_anandrjs

You have to write like

employskills:

Load employeeno as emp,

Skills

From Location;

indskills:

Load

emp,Subfield(Skills,',') as skills

Resident employskiils;

Drop table employskills

Not applicable
Author

hi chouhan see my script.

EMPLOYSKILLS:

LOAD EMPLOYEENO,

     SKILLS

FROM

[..\DATA\EMPLOYSKILLS.XLSX]

(OOXML, EMBEDDED LABELS, TABLE IS SHEET1);

INDSKILLS:

LOAD

[EMPLOYEENO],SUBFIELD('SKILLS',',')AS SKILLS

RESIDENT EMPLOYSKILLS;

SunilChauhan
Champion II
Champion II

Please give space between )as  and write 'Skill'  without single quote  in your script

i mean to say subfiled(Skills,',') as skills

see the example below if data is like below

abc,123,cde

here subfield('abc,123,cde,',',1)  will result in abc

subfield('abc,123,cde',',',2) will Result in 123

subfield('abc,123,cde',',',3) will result in cde

hope this helps

Sunil Chauhan