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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
niharikab
Contributor II
Contributor II

For loop

Hello experts,

please help me to solve this case.I loaded 3 excel files from 3 different folders by using for loop.In Table2 and Table3 has common fileds.In Table1 one field is missing.By using below for loop data is populating but i'm getting synthetic key .How to avoid it.2.PNG

Source data:

Capture.PNG

Thanks in advance.

4 Replies
raji6763
Creator II
Creator II

hi @niharikab ,

if you want to avoid synthetic key,you have to add that missing field in your source data

  • Add A5 field in Table1

 

 

regards,

raji

 

NitinK7
Specialist
Specialist

Hi,

may be

try to add A5 field as empty i table1 like below

Table1:
Load
A1,
A2,
A3,
A4,
'' as A5
from [your path]

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Put this line above your for-each loops:

Data: LOAD 0 as dummy Autogenerate 0;

Then on the line directly above the Trace line put this line:

CONCATENATE (Data)

Finally add this as the last line to your script:

DROP FIELD dummy;


talk is cheap, supply exceeds demand
marksouzacosta

Hi,

We just released a new video in our YouTube channel related to your question.
I hope it helps!

IPC Tips - Removing Synthetic Keys
https://youtu.be/tETUxntiqew

 

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com