Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

script finishes on exists()

Hello!

Tell me?please? why can script finish without even en error on string

IF Exists(Date2,'$(vCurrentDate)') then

?

Before this i'm making a table for product sales for all dates and onle one product

Best regards,

Alex

5 Replies
Chanty4u
Esteemed Contributor III

Re: script finishes on exists()

chk dis

Exit ()

Re: script finishes on exists()

I think the value in the variable is not present in the date2 and hence the condition is not getting satisfied and part of the code in IF block is not working 

//IF Exists(Date2,'$(vCurrentDate)') then

check this for the exists

Understanding EXISTS() function - Qlikview vs SQL/RDBMS

Value of the Flag as "X" is exists "Y" if not e... | Qlik Community

Re: script finishes on exists()

Have you checked the log file to confirm that there was in fact no errors?

Re: script finishes on exists()

Exists() is a so-called Inter Record Function that can be used to evaluate the current record based on values from a previously loaded record or field.

In an IF-THEN-ELSE control statement, you're not loading any records, so I guess the Exists() call will cease to work. Use Exists() in a LOAD statement.

Highlighted
cesaraccardi
Valued Contributor

Re: script finishes on exists()

Hi,

The exists() is an inter record function which means it only works in a context of a loading. I am assuming that is not the case in your script, if so you might want to transfer the logic to the WHERE clause of your load statements.