

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Script Line Error. Can't find my mistake
So I am currently trying to get following code working. When I execute it, I get a Script line Error. The code mentioned in the error starts at line 11. It probably is just a stupid mistage or misconseption as I am very new to this and have like no prgramming experience...
It would be nice, if someone can help me.
Let URL_Base='something';
Let Timeout='something';
Let URL_Open_1='something';
Let URL_Open_2='something';
Let URL_Intern_1='something';
Let URL_Intern_2='something';
Let URL_Extern_1='something';
Let URL_Extern_2='something';
For counter_1=0 to 2
Let URL_1=$(URL_Base)&IF($(counter_1)=0,$(URL_Open_1),IF($(counter_1)=1,$(URL_Intern_1),$(URL_Extern_1)));
Let URL_2=$(Timeout)&IF($(counter_1)=0,$(URL_Open_2),IF($(counter_2)=1,$(URL_Intern_2),$(URL_Extern_2)));
For counter=0 to 14
Let URL=$(URL_1)&($(counter)*1000)&$(URL_2);
CUSTOM CONNECT TO $(URL);
RestConnectorMasterTable:
SQL SELECT
"__KEY_root",
(SELECT
"key",
"__KEY_issues",
"__FK_issues",
(SELECT
"created",
"__KEY_fields",
"__FK_fields",
(SELECT
"@Value",
"__FK_customfield_10306"
FROM "customfield_10306" FK "__FK_customfield_10306" ArrayValueAlias "@Value"),
(SELECT
"@Value" AS "@Value_u0",
"__FK_customfield_10305"
FROM "customfield_10305" FK "__FK_customfield_10305" ArrayValueAlias "@Value_u0")
FROM "fields" PK "__KEY_fields" FK "__FK_fields")
FROM "issues" PK "__KEY_issues" FK "__FK_issues")
FROM JSON (wrap on) "root" PK "__KEY_root";
[customfield_10306]:
LOAD [@Value],
[__FK_customfield_10306]&'.1' AS [__KEY_fields]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_customfield_10306]);
[customfield_10305]:
LOAD [@Value_u0],
[__FK_customfield_10305]&'.1' AS [__KEY_fields]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_customfield_10305]);
[fields]:
LOAD [created],
[__KEY_fields]&'.1' as [__KEY_fields],
[__FK_fields]&'.1' AS [__KEY_issues]
RESIDENT RestConnectorMasterTable;
[issues]:
LOAD [key],
[__KEY_issues]&'.1' as [__KEY_issues]
RESIDENT RestConnectorMasterTable;
Drop Tables [RestConnectorMasterTable];
Let counter=$(counter)+1;
next
Set counter=0;
Let SLA=If($(counter_1)=0,'open',If($(counter_1)=1,'intern','extern'));
STORE [customfield_10306] INTO customfield_10306_$(SLA).qvd (qvd);
STORE [customfield_10305] INTO customfield_10305_$(SLA).qvd (qvd);
STORE [fields] INTO fields_$(SLA).qvd (qvd);
STORE [issues] INTO issues_$(SLA).qva
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had no time to fix this code, so I just did not loop the different URLs and put it in different tabs... But thanks for the help.
The Debugging did not help, as I see no error in my code. This apparently causes the error:
Let URL_1=$(URL_Base)&IF($(counter_1)=0,$(URL_Open_1),IF($(counter_1)=1,$(URL_Intern_1),$(URL_Extern_1)));
But even if the variables included are wrong, it should not give an script line error. I mean I only connect strings. It should give me an failed to connect later, if the URL is wrong.
Anyway, I have a solution that works, but it's just not as nice as this would have been.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you screen shot that script error you are getting?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there more after line 67? if not make sure you have semi-colon there at the end.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Max,
I could see two "FOR" loops in your script but only one "Next" statement. Could you try again by adding "Next" statement in the above script?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I attached the file. Just noticed, that the script line error includes my whole script, not only one tab.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is. See answer to vishsaggi. I attached the whole file.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a second next. Forgot to copy that apperently. See answer to vishsaggi. I attached the whole file.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, and there is no ';' after the next, but I tried it, and it did not work. It gave me more errors. Maybe I did something wrong.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
difficult to identify just my guess
In variable URL_Intern_1 & URL_Extern_1. You are missing " which close your URL double quote (").
If it won't help run your script in debug -> step mode and check where you are getting error.
Regards,
Prashant
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
that is not the issue. I combine URL_Base & URL_1 & URL_2 which is the the actual URL. And the double quotes should be around that, not around each part.
I have a similar code working in another setup just fine, so it should be good. But thanks anyway.

- « Previous Replies
-
- 1
- 2
- Next Replies »