Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a script that used to work with previous versions and definitely worked in QlikView:
[tmpTable]:
Generic Load * Resident [Demographic Responses];
[Demographic Information]:
Load Distinct [Respondent ID] as [Respondent ID]
Resident [Demographic Responses];
FOR i = 0 to NoOfTables()
TableList:
Load TableName($(i)) as [TableName] AUTOGENERATE 1
WHERE WildMatch (TableName($(i)), 'tmpTable.*');
NEXT i
FOR i = 1 to FieldValueCount('Tablename')
LET vTable = FieldValue('Tablename', $(i));
LEFT JOIN ('Demographic Information') LOAD * RESIDENT [$(vTable)];
DROP TABLE [$(vTable)];
NEXT i
Drop Tables [Demographic Responses], TableList;
The first For loop works, but the second does not for some reason. I assure you there is NO problem with the data in [Demographic Responses]. I've tried other types of loops and I am out of ideas. I get the following error every time:
Load TableName($(i)) as [TableName] AUTOGENERATE 1
FOR i = 1 to FieldValueCount('Tablename')
TableName and Tablename are two different fields. So, just a typo.
Missing Capital "N" in ur TableName
u shud use the same fieldnames or table names same for entire document.
That has been corrected, still the same error. I was testing a bunch of different things which is why that mistake is in the original question. I have also tried:
In debugging I'm seeing some weird things happen where the variable "i" is exceeding the actual count of field values and then the loop is breaking. I'll keep at it
I saw you read another similar discussion. Did you enable the legacy mode as mentioned in that discussion?
I have not. This is Qlik Sense server I'm working on. Does it still work with that?
Yes, unfortunately it's a server wide setting. And it has security implications so this is not a step to take lightly. See Qlik Sense Legacy mode for more information.