Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Team,
Below is the script.Qlikview app first refresh vSuccess should show 1 and second refresh vSuccess should show zero.
How to achieve this ?
Let vTest='A';
If vTest='A' then
Let vSuccess=1;
Else
Set vSuccess='False';
end if
Exit Script;
Output:
1.QlikView First Refresh vSuccess=1 (Return 1 value)
2..QlikView second Refresh vSuccess=0 (vSucess should show zero)
Thanks,
Gireesh
Try this
If MonthStart(Today()) = If(Len(Trim(vLastReloadDate)) > 0, vLastReloadDate, 0) THEN
LET vSuccess = 0;
ELSE
LET vSuccess = 1;
ENDIF;
TRACE $(vSuccess);
LET vLastReloadDate = Num(MonthStart(Today(1)));
How about the third refresh? or the first refresh of the hour or day or month or year is set to 1 and then every subsequent ones are set to 0?
Need 1 only for first refresh and other subsequent refresh it should return 0.
1st refresh ever or 1st refresh of the day or 1st refresh of the month?
Try this
If MonthStart(Today()) = If(Len(Trim(vLastReloadDate)) > 0, vLastReloadDate, 0) THEN
LET vSuccess = 0;
ELSE
LET vSuccess = 1;
ENDIF;
TRACE $(vSuccess);
LET vLastReloadDate = Num(MonthStart(Today(1)));
Below condition is failing at first time because of variable(vLastReloadDate) not found.
If MonthStart(Today()) = If(Len(Trim(vLastReloadDate)) > 0, vLastReloadDate, 0) THEN
To handle the no value within vLastReloadData, I am using Len(Trim())... I tried it before sending the code and it worked for me. Can you share a sample where this isn't working? or share screenshot where we can see that this doesn't work.
Its Working fine.Thank you so much 🙂
Awesome, I am glad it worked now. Please close the thread by marking a solution.
Best,
Sunny