
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nested IF Else Statement
Hi,
Why the script bellow is failling in qlik sense , i'm expecting it returns "Step 1"
if 1=1 then
If 1=1 then
Trace Step 1;
else
Trace Step 2;
End If
Else
Trace Step 3;
End If;
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Works as expected:
|
|
Make sure you don't have anything else before it that interferes. Based on the error message, I believe this to be the case.
In your screenshot, you can actually see "Trace 1" in the log.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This does trace 'Step 1' to the reload log. Is that what you want it to do?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
it returns an error :

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I attched the error message, want to figure out with you what"s the issue of using the syntaxe

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Works as expected:
|
|
Make sure you don't have anything else before it that interferes. Based on the error message, I believe this to be the case.
In your screenshot, you can actually see "Trace 1" in the log.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The script is working now, i pasted it in a new app, it seems that it was taking into account the other parts of the script that was after the "Exit script" !!
Ok ! lesson learned 🙂 thank you for you support all.
