Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Checking a source file for missing/ wrong field names

1 Reply
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

Hi,

Try this sample script

Table:

LOAD

*

INLINE [

A,B,C

1,2,3];

QVDTable:

LOAD

*

INLINE [

A,B,D

1,2,4];

LET vFieldName = '';

LET vQVDTableFieldName = FieldName(3, 'Table');

For i = 1 TO NoOfFields('QVDTable')

  LET vTableFieldName = FieldName($(i), 'Table');

  LET vQVDTableFieldName = FieldName($(i), 'QVDTable');

  IF vTableFieldName = vQVDTableFieldName THEN

  //DO Nothing

  ELSE

  LET vFieldName = vFieldName  & vQVDTableFieldName & ';';

  ENDIF

NEXT i

Regards,

Jagan.